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

Save and Refresh Problem

Status
Not open for further replies.

topdesk123

Programmer
Sep 27, 2001
76
0
0
US
Good morning!

I have been racking my brain on this. I have a form that consists of a tab control, some tabs contain subforms based on other tables. I have a procedure that calculates totals and sets the value of the ID (key) field in a subform equal to the ID field in the main form. When going to the tab that contains a field from the subform's table and trying to enter data, I get this: "The field ID cannot contain a null value because the required property is set to true....bla bla bla". The ID is there, and I have tried Save, Refresh, Requery in every place possible, to no avail. Thoughts? Please let me know if you need additional information.

Thanks!!
topdesk123
 
Seems the subforms aren't linked to the main form ...
Have a look at the LinkChildFields and LinkMasterFields properties of the SubForm object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
So, if they're linked, why have you a procedure to set the value of the ID (key) field in a subform equal to the ID field in the main form ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I don't know why it didn't work. I've reworked the procedure though because I can't take anymore time trying to figure it out. Thank you PHV for you input!! ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top