sendkeys for Escape trouble

Ziggy1

Registered User.
Local time
Today, 10:17
Joined
Feb 6, 2002
Messages
462
Here's the situation...in case another method can be used....

I'm selecting records in a combo, and in the Before update event I am checking for duplicates.... when one is found it triggers a message and I cancel/undo to clear the selection...I am then trying to send the ESCAPE key to, what I have below won't do it....

DoCmd.CancelEvent
Me.Document.Undo
SendKeys "{esc}"


thanks
 
Why the Escape? Doesn't that undo the whole form? So you should change

Me.Document.Undo

to

Me.Undo

And then no need to use the escape key.
 
Bob as always you are "Da man"... the me.undo did it...what I wanted was the field to be completely reset as it was still expecting a value and giving that error field can contain a null blah blah..

thanks
 

Users who are viewing this thread

Back
Top Bottom