Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot add or change a record

Status
Not open for further replies.

lpgagirl

Technical User
Feb 3, 2003
202
CA
Hello,
I have a main form that gets its data from 3 tables. Main, Personal and Preparedness. The form is based on a query (3 tables) that sorts the records by last/first name ascending order. The tables all have a primary key called ContactID. Main is an auto the number and the other 2 a number.

The form is used to add/edit/search contact info. It has three sections that correspond to the above tables. Problem: I have found that when I try to enter info. in the preparedness part of the form for MY record only (I think, haven't tested all 1900 records)I get an error that reads: "YOU CANNOT ADD OR CHANGE A RECORD BECAUSE A RELATED RECORD IS REQUIRED BY TABLE "MAIN" " I do not get this error when I enter data on any part of the form for other records. Any ideas?
I looked in the main table and my record IS there, as all other are.

Thanks again......

Jeannie
 
There are rules about laying out forms with multiple tables eg which join fields must be present for various things to happen. Have you checked these?

 
This may be what BNPMike is talking about, but I believe if relationships have been established between the tables and referential integrity is applied, a record must exist on the one side of a one-to-many relationship. I had a similar problem before and I couldn't enter a record on the many side of the above relationship before the related record was entered on the one side. Hope this helps a little.

Good luck.
 
Yes, however the odd part of this is that it is only happening on one record (as far as I know). I have entered/updated other records with no problem. In this case the related record is there...so I am at a loss.
Thanks

Jeannie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top