dates issue (1 Viewer)

bigmac

Registered User.
Local time
Yesterday, 17:54
Joined
Oct 5, 2008
Messages
295
hi can you help please , i have a date textbox that uses a date picker, i want to be able to restore original date if certain conditions are not met, i know how to set the conditions but not how to replace any update with the original date, any ideas please :banghead:
 

Ranman256

Well-known member
Local time
Yesterday, 20:54
Joined
Apr 9, 2015
Messages
4,339
You need another field,OrigDate to hold it,
Or
In a form ,hold the orig date in another text box. Restore from that.
But once you leave the form, the orig date is gone.
I don't know how long you want to hold onto that orig date.
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 20:54
Joined
Jan 23, 2006
Messages
15,364
You might also consider the BeforeUpdate event where you could check your conditions and decide whether or not to change the "current value".
 

isladogs

MVP / VIP
Local time
Today, 00:54
Joined
Jan 14, 2017
Messages
18,186
Nothing wrong with any of the previous suggestions.
You could also save the old value as a variable before updating and restore from that rather than saving to a separate field or to a textbox
 

bigmac

Registered User.
Local time
Yesterday, 17:54
Joined
Oct 5, 2008
Messages
295
thanks all i went for JDRAW's solution and it works great
 

Users who are viewing this thread

Top Bottom