Hi
i'm creating a database for clinic and i want to add a validation rule for the date column no appointment's in friday
Hi
i'm creating a database for clinic and i want to add a validation rule for the date column no appointment's in friday
IMHO validation is usually best done in a forms Before Update event. Are you using a form to Add/Edit data?
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
could you help me to define this validation rule
in the column date In design mode
I agree with putting it in forms BeforeUpdate event;
however, in the table's design view try this in your date column's criteria
Weekday(["your date field name"]) <> 6
If you do not want appointments on Friday (and Saturday and Sunday), I suggest code that tests this logic
Weekday(Day(AppointmentDate)) Not In (5,6,1)
OOOOops: I see Nick has posted while I was typing. The red above deals with Saturday and Sunday.
it does not work
i want it just for "Friday"
I use Microsoft office 2007
it does not work
That doesn't help readers-- Did you get an error? Which It are you referring to?
What exactly did you try? Show us a screen capture or code.
I would use code in the form's before update event as others have said.
https://www.mediafire.com/?jxqdaajn3bxedcz
this is a simple file contains a table name appointments ( ID , Date )
could you please apply the validation rule to the file and re post it !
many thanks
Cannot access, blocked at work. Can you attach to post as a zip file?
Attached is jpg.
You change the table(design) --property --validation Rule--validation text
Note: Date is a reserved word in Access.