Calendar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that we use for our vacation. I need to come up with some
code that prevents people from signing up for vacation on a weekend (sat &
sun) We use the calendar in access. Is there a way to configure that so
that it will not let them sign up for any sat or sun? If not is there any
other way?

thanks
 
Hi,
You would have to check that the date they picked is not a Sat or Sun.
Assuming your control is named calctl

If WeekDay(Calctl) = 7 Or WeekDay(Calctl) = 1 Then
MsgBox "You can't take holidays on the Weekend"
End If

HTH
Dan Artuso, MVP
 
Back
Top