Need help with a sub form. Linking issue

Jon123

Registered User.
Local time
Today, 14:01
Joined
Aug 29, 2003
Messages
668
So I have a field on the main form that is called mainID which is an auto number and gets updated when you start a record. This field is set as the master link. On my sub form I have a field ID which is set as the child link. So when the form opens there is no data in this field so I get a message box wanting me to enter the mainID. I guessing that the sub form needs to know what the number is for linking but if I have not started a record then there is no mainID.

How do I get around this but keep the data from the 2 forms linked?

Jon
 
Last edited:
No it shouldn't be that, do you have some code in the main or sub form running when the form open?

What is the record source for the subform, table or query, (if query the show it)?
You could try to remove the master/child link between the forms only to see what happens then.
 
Last edited:
Yes I have code in the on open and in the on load if I remove it all works like it should. I need to turn the code back on in steps to see what the problem is.
Thank you

Jon
 
Tell if you find the problem, else post the code/database.
 
found an If statement that was pointing to the value of a Yes/No field. Apperantly you can't use yes. I changed to the 1 / 0 and it works like a champ.
 

Users who are viewing this thread

Back
Top Bottom