Sendkeys statemet

C

Carriolan Shinobi

Hi need some help here please. I am trying to abandon the update of a
record by attaching the sendkey to a comand button using {ESC} in
either a macro or a module. I have not been able to get it to work.
However if I directly press the ESC key it works perfectly!
 
R

Rick Brandt

Carriolan Shinobi said:
Hi need some help here please. I am trying to abandon the update of a
record by attaching the sendkey to a comand button using {ESC} in
either a macro or a module. I have not been able to get it to work.
However if I directly press the ESC key it works perfectly!

There is (almost) never a reason to use SendKeys and there are numerous reasons
NOT to.

Just use...

Me.Undo
 
G

Guest

Im with Rick with that post, only that the me.undo will undo all the inputs
in the form, but if you want to undo the input in the last field only, then
you can use the sendkey only if didn't exit that field yet.

The syntax will be
sendkeys "{ESC}"
 
M

MacDermott

Or use Screen.ActiveControl.Undo


Ofer said:
Im with Rick with that post, only that the me.undo will undo all the inputs
in the form, but if you want to undo the input in the last field only, then
you can use the sendkey only if didn't exit that field yet.

The syntax will be
sendkeys "{ESC}"
 

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

Similar Threads


Top