By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,071 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

Restore Value

P: n/a
Imagine that I have a MsgBox that asks the user if he wants to confirm the
changes in a form field.
By clicking "No", I'd like to restore the value to the initial one.
Does anyone knows how can I restore the value of the field in a form?
Thanks
Antonio
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
thecontrolname.Undo

António Castro Caldas wrote:
Imagine that I have a MsgBox that asks the user if he wants to confirm the
changes in a form field.
By clicking "No", I'd like to restore the value to the initial one.
Does anyone knows how can I restore the value of the field in a form?
Thanks
Antonio


--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html

Nov 13 '05 #2

P: n/a
António,

Use the BeforeUpdate event on the field. If the user selects No, set
Cancel = true.

-Ken

Nov 13 '05 #3

P: n/a
jv
There are a couple of ways. You can use FieldName=FieldName.oldvalue
or FieldName.undo. Or if the msgbox is being called from a
BeforeUpdate event then you can set the Cancel parameter to True.

Nov 13 '05 #4

P: n/a

Me.Undo

António Castro Caldas wrote:
Imagine that I have a MsgBox that asks the user if he wants to confirm the
changes in a form field.
By clicking "No", I'd like to restore the value to the initial one.
Does anyone knows how can I restore the value of the field in a form?


Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.