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

Linked field is locking out the other tables

Status
Not open for further replies.

xuldinga

MIS
Nov 10, 2004
5
US
I have one master table with EmployeeID as the primary linked out to 6 other tables.

I have a form with tabbed sections and text boxes. You can cycle through the employees or you can add a new employee. The form is bound to a query polling the master table and its related tables. The form is bound to a query polling the master table and its fields.

If I go to the next empty record and put in a new employID it gives me the same error. I understand the relational concepts, but I am having complications. If you try to add a new record to the master table it errors out that EmployeeID in another table doesn't match it. I have checked the relationships and I even retun all rows from the master table. Any ideas?
 
Hi

Your problem is, "Master" record (ie the one side) is being created, but not saved, before attempt is made to create "child" (ie the many side) record(s)

I assume you are using subform9s) on the tab controil pages to display the "child" records ?, if yes, in the OnEnter Event of the subform control, put code so

If Me.NewRecord Then
docmd.runcommand acCmdSaveRecord
End If

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I assume you are using subform9s) on the tab controil pages to display the "child" records ?, if yes, in the OnEnter Event of the subform control, put code so"

I do have subforms, but I never make it off the EmployeeID field. When the form first loads it says "calculating..." the moment I try to type in the text field, and it stays there. Now if I type in another field (which is possible) and then go back to the employeeID field I can edit it, but then when I try to lose focus of it I get the message I previously mentioned. I can't click anything without getting that message once I have something in that box. Now I have tried to access the table itself and the same thing happens. but when I tried to edit EmployeeID in the related table I had no problems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top