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

setting validation rules in Access 2003

Status
Not open for further replies.

gchaves

Programmer
Oct 27, 2003
105
US
I am trying to set a validation rule for my Year field so that it will only accept years that are greater than or equal to 2004 (ex. >=2004). My field is set as a number, yet when I enter >=2004 in my validation rule, it does not seem to work. Can anyone please help?

Thanks...G
 
If you are having the end user enter a date, then try
> #12/31/2003#

You can also use the same approach with the BeforeUpdate event procedure.

If Year(Me.YourDateField) < 2004 then
Cancel = True
End If

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top