Me.Undo vs. DoCmd.RunCommand acCmdUndo

Dudley

Registered User.
Local time
Yesterday, 22:58
Joined
Apr 7, 2004
Messages
147
I'm wondering about the relative merits of Me.Undo versus DoCmd.RunCommand acCmdUndo. Why would I use one or the other, and when? Is one better than the other?

Generally, I'm using one or the other on forms in BeforeUpdate as part of error-trapping and saving records.

I'm afraid the depth of my knowledge is that I notice that Me.Undo is shorter. ;)

Any help with deepening my understanding? Or pointers to references equally appreciated. Many thanks!
 
dont know which - but i think one of the commands will be old-style, but retained to maintain compatibility with previous versions of access, so both do the same

eg sendkeys is still supported, but there are easier ways of doing things

eg there are some things that can be done by docmd object, or runcommand method, (i think in those cases access recommend runcommand)

im sure there are many others as well
 
Hi Dudley,

The "Me." refers to the current object that is in focus. i.e. the the form is open and is running.

However, "Me." cannot work with a form that is not in focus. So what if the second form that is not in focus? That's where "Docmd.RunComand acCmdUndo" come in.

I'm wondering about the relative merits of Me.Undo versus DoCmd.RunCommand acCmdUndo. Why would I use one or the other, and when? Is one better than the other?

Generally, I'm using one or the other on forms in BeforeUpdate as part of error-trapping and saving records.

I'm afraid the depth of my knowledge is that I notice that Me.Undo is shorter. ;)

Any help with deepening my understanding? Or pointers to references equally appreciated. Many thanks!
 

Users who are viewing this thread

Back
Top Bottom