saving data in a sub-form

joeblow2

Registered User.
Local time
Today, 07:13
Joined
Jun 28, 2008
Messages
39
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.
 
So you are putting main table data fields into a subform which you then place on the main table's form?

-dK
 
Is the main form data populating the subform?

A command button won't work in the subform if it's in datasheet mode.

The last question is: "Is the data from the main on a new record in the sub?"
 
When you say "it doesn't work" could you be more specific? Exactly what does that mean? Does an error occur? Does it just sit there?

It is good to provide specific examples as opposed to saying that it just doesn't work.
 
The code the wizard uses has been obsolete for years now anyway, however if the button is on the main form, the subform record will have already been saved by the time you navigate back to the main.
 
Could you please share the resolution? :D

Just curious.
 
I used the wizard and to save, I chose move to next record.
The code it put for me was:
DoCmd.GoToRecord , , acNext

Thanks.
 

Users who are viewing this thread

Back
Top Bottom