how do i set up a query for mondays only

G

Guest

hi everyone

i would like to be able to set up a query so that if a monday is seleced on
a calander
a message will appear say something about the monday eg can only take 10
patients. and so on for different days of the week eg tuesday can only take 5
patients.

i am using MSCAL.Calendar.7 on the form for the user to select the date.

yours

david
 
P

PC Datasheet

Put the following code in the AfterUpdate event of the calendar control:
Select Case WeekDay(Me!NameOfCalendarControl.Value)
Case 2
MsgBox "Monday can only take 10 patients"
Case 3
MsgBox "Tuesday can only take 5 patients"

<Continue with remaning days of week>

Case Elsa
MsgBox "Doctor is not in on this day"

End Select
 

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