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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undo changing value of DatePicker control? 1

Status
Not open for further replies.

BFarley

Programmer
May 22, 2008
43
US
I have a form with a Datepicker control. Once the date changes, there are some actions that need to be performed ... however, I'd like the user to be aware of these changes, and allow the user to cancel out, restoring the DatePicker's original value. This would be analogous I suppose to code written for the BeforeUpdate event in VBA.

However, I'm not seeing an Undo method being exposed for the DatePicker control.

Is there a fast easy way to restore the original value of the DatePicker control if the user responds that they do not wish to continue?

Two ways I'd thought of accomplishing this:

1. Text box that holds the "old" value of the DatePicker control; this value is copied back into DatePicker if the user decides not to proceed with the new date

2. Alert the user what effects the date change will have, and require a manual button click to do the recalc; user can always change the date back at that point.

#1 seems easier, but I wanted to let you know I was at least trying to think things through here :)

Appreciate your help and insight.

Bryant Farley

"The Dude Abides
 
1) Not necessarily a textbox to store the value. You can have a variable dim as date.
2) Alert the user with a YesNo messagebox to recalculate or cancel


________________________________________________________
Zameer Abdulla
Help to find Missing people
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top