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!

Fairly Simple 1

Status
Not open for further replies.

jimb0ne

Programmer
Oct 6, 2003
291
0
0
CA
I have a problem in which from a main form, I got to subforms to enter information. The problem is the subforms tables are linked via relationships to the table from the main form, when I am entering a new record, the mainform information has not yet saved to the table when I try to enter data into the subforms tables, hence I get an error saying that there is no related key in the main table. What code do I run to write the information from the main form to its related table, before I open the subform for the user to enter information on the other tables?

thanks in advance,
jimb0ne
 
Have you tried this ?
DoCmd.RunCommand acCmdSaveRecord

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
heh, no, I couldn't remember what to use, and I'm running access in spanish so I'm totally lost when it comes to the documentation. Thanks again for the help, exactly what I need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top