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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Id field linked between forms when adding new records

Status
Not open for further replies.

DBritter

Technical User
Jun 28, 2000
37
US
Situation:<br>I am creating a database with with four main tables.<br>1. tblLead<br>2. tblLeadDetail<br>3. tblOrder<br>4. tblOrderDetail<br>I am creating data entry forms and using an autonumber field in the [tblLead]! to link the forms together. The relationship between the first 3 forms is a one to many with [tblLead]! being the one(referencial integrety is enforced). The [tblOrderDetail]! uses a different index and I don't have any problems because it is usually viewed as a subform.<br>The sequence of the data entry forms is the same as the way they are numbered above. The 3 are linked by [lngLeadID] field.<br><br>Problem:<br>I can not get the [lngLeadID] field to link between forms. After I have entered a new record in the [tblLead]and then finish with the [tblLeadDetail], I get a message that I cannot save the record because it is missing a related field in the [tblLead]!. I have the [lngLeadID] field in all three forms and they are set as lookups in the row source properties. <br>
 
Here's some troubleshooting, it might be something else, though.<br><br>Try to save the record in the main form before you enter a record in the subform.<br><br>Check the control source of your combo-controls (se if they try to save in the correct table)<br><br>It seems you have control over the linkage between the forms, but anyway check it (link master/chield-fields).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top