Validation Rules

  • Thread starter Thread starter scottchampion
  • Start date Start date
S

scottchampion

How can I create a validation rule that allows a user to only enter a
date which is a Sunday?

I have tried the following, but receive an error message:

Weekday(PeriodStartDate)=1

I think that the problem is that I am not correctly referencing the
field's name in my validation function.

Any help would be appreciated.

Thanks!
 
Try wrapping the object name in square brackets:

Weekday([PeriodStartDate])=1

If that doesn't work try also converting the value to a date/time value:

Weekday(CDate([PeriodStartDate]))=1

Ken Sheridan
Stafford, England
 
Scott,

Where are you putting this expression? And what is the error message
you are getting?

If you are doing it in the table, you will need to put it in via the
View|Properties menu, rather than the Validation Rule for the field...
is that what you've done?

Also, I would enclose the name of the field in []s.
 
Back
Top