Sendkeys statemet

  • Thread starter Thread starter Carriolan Shinobi
  • Start date Start date
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!
 
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
 
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}"
 
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}"
 
Back
Top