Validation Rules

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!
 
G

Guest

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
 
S

Steve Schapel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top