Can I have help with one question please

ajwposh

Registered User.
Local time
Today, 13:40
Joined
Dec 7, 2005
Messages
10
I am currently building a database in Access, and I have a field for a date of an order. I want to put a validation in so that if the user enters a date in the past, I can say that the date is in the past. I dont know what the validation rule is though to say, cannot be before the current date.

Can somebody help me please
 
do i have to put the date in there though because it doesnt work just like that and i cant keep putting a different date in every day
 
>=Now() would probably work better
This means they can enter todays date or tomorrows date or any date in the future and nothing before hand
/locomotion
 
Last edited:
My apologies I put in the wrong < sign:rolleyes:

Col
 
yeah I thought that might have been a little bit out of place ;)

/locomotion
 
locomotion said:
yeah I thought that might have been a little bit out of place ;)

/locomotion
Just testing you Loco;) :D

Col
 
ajwposh said:
do i have to put the date in there though because it doesnt work just like that and i cant keep putting a different date in every day

No. Date() returns today's date, so you would not need to change that. However, I think you need >Date() to make sure you only get dates in the future. If you want to include the current day as a valid entry, use >=.

locomotion said:
>=Now() would probably work better
This means they can enter todays date or tomorrows date or any date in the future and nothing before hand

Now returns the date AND time. Unless you want time as well, this is not the best solution.
 
well he certainly wouldn't want them to add the date 2 minutes before hand now would he :D
 
reclusivemonkey said:
No. Date() returns today's date, so you would not need to change that. However, I think you need >Date()
Isn't that what I said?, except I put a < instead of a >

Col
 
we all knew what you meant

I think your way was better though

However the first way you suggested sort of did the opposite ;)
 

Users who are viewing this thread

Back
Top Bottom