Subforms work but not as part of the main form

Richard1941

Registered User.
Local time
Yesterday, 22:33
Joined
Oct 29, 2012
Messages
34
I have three subforms for selecting three values for a many-many relationship. When I run each of the subforms alone, they work perfectly. So I put them on the main form and one of them work and the other two don't. In the two that don't, no record is found although the combo box is updated correctly. The error shows up where I display the record ID for the selected record. Again, one of them shows the record ID, the other two show (New).

If they work alone, why don't they work when embedded in the main form?

Thanks,
Richard
 
They are NOT correctly linked with the Master/Child corresponding Key.
 
References to controls in a form change if you embed the form into another form.

A textbox in a stand-alone form would be Forms!NameOfForm!NameOfTextBox

But if you embed that form in another form (and you parhaps had a query referring to that textbox) then the new reference would be
Forms!NameOfForm!NameOfSubformControl.Form!NameOfTextBox

and similar for all other controls.
 

Users who are viewing this thread

Back
Top Bottom