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

Can you close more than one form with the DoCmd.close statement?

Status
Not open for further replies.

martinrobson

Programmer
Jun 2, 2003
19
0
0
GB
Hi,

I have a strange problem.

I have 2 forms. Form 1 contains an id field which i need to display on form 2, so i have to have form 1 open when i access form 2 so that it can reference the id.

The problem i have is that some of the data which is entered on form 2 requires the data from form 1 to be in the database table. Unfortunately because form 1 is still open it hasnt been submitted.

Is there anyway that i can set form 2 up so that when i click the save button, it closes form 1 (adding its data to the table) then closes form 2 (adding its data to the table)?

Thanks in advance for your help
 
docmd.runcmd acCmdSaveRecord in save event routine.....before opening second form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top