A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Referential integrity not being enforced



 
 
Thread Tools Display Modes
  #1  
Old February 4th, 2006, 06:11 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Referential integrity not being enforced

You may have a PatientID without having entered a FName and LName. This is
probably the record you are entering visits against.
Modify your table to make LName a required field.



"Kurt" wrote:

Despite enforcing referential integrity between my tables, I am able to
create a record in the child table without a corresponding record in the
parent table.

For example, tblPatients has a one-to-many relationship to tblVisits. (A
patient can have many visits.) They are linked by PatientID.

tblPatients
------------
PatientID (PK)
FName
LName
…

tblVisits
------------
VisitID (PK)
PatientID
VisitDate
VisitLocation
…

The main form, frmPatients, has one subform, fsubVisits. They are linked by
PatientID.

I can enter any number of records into fsubVisits without ever entering a
patient, and I don’t get the usual error message when I try to leave the
record or subform.

Any idea what’s overriding the referential integrity?

Thanks.

Kurt

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tasks, Assignments and Projects Database Structure. Bernard Piette Database Design 2 December 21st, 2005 01:30 PM
Referential Integrity Problems georgeg via AccessMonster.com General Discussion 2 November 2nd, 2005 05:56 PM
Multiple referential integrity johnver General Discussion 3 July 21st, 2005 08:18 PM
Referential Integrity Shoelaces General Discussion 1 May 12th, 2005 06:38 PM
For John Vinson dee New Users 9 April 23rd, 2005 12:56 AM


All times are GMT +1. The time now is 12:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.