Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations danielledunham on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to recover changed data in bound textbox 2

Status
Not open for further replies.

bllgnn

Programmer
Joined
Jan 20, 2002
Messages
42
I need to ask the user if he is sure he wants to change certain (but not all) bound text boxes on a form. If I give him a Yes/No choice and he chooses No, is there a simple way I replace the data in the text box with what was there before the change?

I've read about Commit and Rollback using DAO, but that seems like overlkill.
 
in BeforeUpdate check hte OldValue.

lookup the terms in HELP.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
On a case by case basis check use the Before Update event for you question because it returns a Cancel paramater. If the answer is no do the following:

If answer to question is No Then
Cancel = True
Me.YourTextBoxName.Undo
Exit Sub
End If

You can do the same thing in form Before Update with Me.Form.Undo but that will clear them all.

Good LucK! Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need![thumbsup]
 
SBendBuckeye

That does the trick. Thank you for your help.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top