See the SendKeys statement in VB Help.
Using SendKeys is kind of a klutzy way to do something. What is it you are
trying to accomplish? There may be a better way.
If someone has information in a particular textbox on my form and the record
is not saved or the user doesn't want the record saved, it seems the form
wants other information added or something done before the form is closed. I
get a message saying the record can't be saved. Hitting the escape key
deletes this info and lets the form close. I hope you understand what I'm
saying. Any help would be appreciated.
Me.Dirty = False will force an update.
To avoid an update, use
Me.Undo
That will prevent the update and set the values in the form back to what
they were before the close.
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.