acSaveRecord Help

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
 
S

strive4peace

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
*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top