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

VALIDATE DATE TO ENTER ONLY THIS YEAR AND AFTER

Status
Not open for further replies.

billquga

Technical User
Aug 23, 2001
19
US
Hello all! I have a table where i enter shipping information. in one of the fields [ACTUAL SHIP DATE](format is short date) I would like to make it so only a date that happened in or after the year 2002. is this possible? any help would be appreciated.

Thanks!
 
You could set the Validation Rule property to ">= DateSerial(Year(Date()), 1, 1)". That would allow any date in the current or a later year.

If you only want future dates, excluding earlier dates in the current year, use ">= Date()" instead.

Rick Sprague
 

Billquga and Rick,
Wouldn't >#12/31/01# in the validation rule work as well?
 
Jpeneh10,
Yes, it would, taking what Billquga said literally. I inferred, perhaps incorrectly, that he was interested in limiting inputs to current and future dates, or at least dates in the current and future years. That seemed likely to me for a shipment date. Rick Sprague
 
Similarly to RcikSpr's idea, if wanting to make this more robust rather than just hard coding, you might add make the limit a certain amount of time aftersome other field, like an order date.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top