save record

A

Alu_GK

What is the difference between the command
docmd.save
and
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
both commands seem to save the record.
(access 2003, vista)
10x
 
M

Maurice

With the first option it is also possible to save other objects in the db for
instance forms. So when coding and making changes in designtime you can save
that in designtime as well. The second option is explicit for saving records.
 
A

Allen Browne

DoCmd.Save saves any changes you have made to the form.

To save the record, turn off the form's Dirty property:
If Me.Dirty Then Me.Dirty = False
Provided the form has focus, this will work as well:
RunCommand acCmdSaveRecord.

The wizard code is ridiculous. What is actually asks for is to simulate
clicking the 5th item on the 6th menu of the standard forms menu that was
built into Access 95 (internally called version 7.) One day, somebody's
going to put that line into a book of nostalgic computer oddities. :)
 
A

Alu_GK

Thanks..
So if the user will change the font size or color in a text box, in the
"docmd.save" he will be able to save the change not only the data change.
And in the 2nd option the formating change won't be saved.
Is that correct ?

10x
 
A

Alu_GK

10x.
and i thought i was the only one who doesn't understand this usage of the
old command.
Thank u
 

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