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

saving data in a subform 1

Status
Not open for further replies.

joeblow3

Programmer
Jun 9, 2008
21
CA
Hi:

I am having a problem with saving data entered in a sub-form.

I put a command button on the sub-form and used the wizard as follows:
I chose "Record Operations", and "Save Record".

It filled in code:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

But this does not work! my sub-form is to save in a different table than the main form's table.

The two forms are ofcourse linked by a field common to both.(Both the Child and Master fields
of the sub-form say "Event_id" for example).

Thanks in advance.
 
Why do you think you need to force a save? This generally happens automatically when the form loses focus. If your code is running in the main form, it will save the record in your main form.

You may be able to add code like:
Code:
Me.sfrmCtrlName.Form.Dirty = False

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top