acSaveRecord Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following SQL code and it is supposed to complete a number of
processes and save the record as opposed to completing the processes and
exporting the record. The problem is that it is not saving all of the forms
in the record. Any ideas?

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close
 
Hi Chris,

a correction on terminology <smile> -- this is VBA code, not SQL code ...

you can specifically save records in forms by doing this:

assuming you are in code behind main form:

if me.dirty then me.dirty = false

if me.subform1_controlname.form.dirty then
me.subform1_controlname.form.dirty = false

if me.subform2_controlname.form.dirty then
me.subform2_controlname.form.dirty = false

etc

it is best not to use the DoMenuItem versions of code -- they are
outdated (yes, I know that is what the "wizard" generates...)


Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Back
Top