Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how can i undo TextBox change by using VBA?

1,021 views
Skip to first unread message

Jinwoo Park

unread,
Mar 25, 2001, 7:52:40 AM3/25/01
to
Hello,
I'm trying to make undo function(? just call it like that..) by using VBA.
it's easy to cancel some change of textbox by pressing [ESC] key..During
editing mode.
what i want to do is when some chages happen in textbox, just display some
confirm message (BeforeUpdate Event) and if the answer is 'no', I 'd like to
undo this change, which means return clearly to the state when no key was
pressed.
when just doing "Cancel = True" and "Docmd.Undo" the form stay edit
mode(pencil picture is appeared on left top side of form) and I need to
press [ESC] Key for escaping edit mode... How can i escape editing mode not
using [ESC] key? need your help...
Someone who know the code , It will be highly appreciate to let me know
that.
Have nice day.

john spencer

unread,
Mar 25, 2001, 9:24:18 AM3/25/01
to
You can use the Undo method to reset a control or form when its value
has been changed. For example, you can use the Undo method to clear a
change to a record that contains an invalid entry.

So you can use
Me.Undo 'to reset the current form
or
Me!txtControl.Undo 'to reset a specific control

It sounds as if you want the first option.

Jinwoo Park

unread,
Mar 25, 2001, 6:22:15 PM3/25/01
to
Thank you. it works well !!
Have nice day.

"john spencer" <spen...@home.com> wrote in message
news:3ABDFFBF...@home.com...

0 new messages