Tezcatlipoca
Registered User.
- Local time
- Today, 21:33
- Joined
- Mar 13, 2003
- Messages
- 246
I know this one should be simple, but I jsut cannot see it, and a search of the forums doesn't seem to help.
I have an unbound textbox, txtDate. For various reasons, this box is - and must remain - in text format, as it doesn't always contain an actual date. Various other codes populate this box, sometimes with text (such as "Last August" or the like), and sometimes with a date (which will be listed as text in the following format: "yyyy/mm/dd").
What I'm trying to achieve is some code that when - and only when - a date gets put into this box, it corrects the date into dd/mm/yyyy format then compares it to the system date. If the txtDate date is in the past, something should happen, if it's in the future nothing should happen.
I've tried creating a second textbox with the format Day(Right(Left([txtDate],8),2)) & Month(Right(Left([txtDate],6),2)) & Year(Left([txtDate],4)) to try and turn the text into a proper date, but this just returns an error.
I have an unbound textbox, txtDate. For various reasons, this box is - and must remain - in text format, as it doesn't always contain an actual date. Various other codes populate this box, sometimes with text (such as "Last August" or the like), and sometimes with a date (which will be listed as text in the following format: "yyyy/mm/dd").
What I'm trying to achieve is some code that when - and only when - a date gets put into this box, it corrects the date into dd/mm/yyyy format then compares it to the system date. If the txtDate date is in the past, something should happen, if it's in the future nothing should happen.
I've tried creating a second textbox with the format Day(Right(Left([txtDate],8),2)) & Month(Right(Left([txtDate],6),2)) & Year(Left([txtDate],4)) to try and turn the text into a proper date, but this just returns an error.