ESC Key in VBA (1 Viewer)

JimMiller

Registered User.
Local time
Today, 13:40
Joined
Oct 22, 2001
Messages
18
Does any one know how to code the action of the ESC Key in VBA? The specific action I am looking for is when a record that is being updated is canceled out of.
 

JimMiller

Registered User.
Local time
Today, 13:40
Joined
Oct 22, 2001
Messages
18
Rich..thank you for your reply! When I use Me.undo I get the following:

Run-time error '3020', Update or CancelUpdate without AddNew or Edit

Does this mean I must have a record inserted before I undo it...
 

JimMiller

Registered User.
Local time
Today, 13:40
Joined
Oct 22, 2001
Messages
18
I relize that me.undo is more reliable, but do you know the VBA code for the ESC key?
 
R

Rich

Guest
You can only Undo newly added/edited records, the same applies to ESC. Please explain what your trying to achieve.
 

JimMiller

Registered User.
Local time
Today, 13:40
Joined
Oct 22, 2001
Messages
18
Rich...thanks for all your help! I figured it out.
 
S

suy

Guest
If you use the SendKeys instruction with {esc}it also works - although I don't think this is "professional" coding.
 

Users who are viewing this thread

Top Bottom