C
CN
I have a button on one form that has a macro behind it
which needs to first make sure that the last row edited on
that form and other open forms is updated to the database.
Found out from an earlier post, to use
DoCmd.RunCommand acCmdSaveRecord
which works great to save the current row on the form that
my button is on but how can I do that for each of the
other open forms?
I'm trying things like
CurrentProject.AllForms(0).DoCmd.RunCommand acCmdSaveRecord
CurrentProject.AllForms(1).DoCmd.RunCommand acCmdSaveRecord
CurrentProject.AllForms(2).DoCmd.RunCommand acCmdSaveRecord
but they all give me 'invalid property' type errors. I
know this must be easy but I can't seem to find out how to
do this anywhere. Thx.
which needs to first make sure that the last row edited on
that form and other open forms is updated to the database.
Found out from an earlier post, to use
DoCmd.RunCommand acCmdSaveRecord
which works great to save the current row on the form that
my button is on but how can I do that for each of the
other open forms?
I'm trying things like
CurrentProject.AllForms(0).DoCmd.RunCommand acCmdSaveRecord
CurrentProject.AllForms(1).DoCmd.RunCommand acCmdSaveRecord
CurrentProject.AllForms(2).DoCmd.RunCommand acCmdSaveRecord
but they all give me 'invalid property' type errors. I
know this must be easy but I can't seem to find out how to
do this anywhere. Thx.