I've been working on this for quite some time now, and I can't get it to work
still. Here is my code based on what you gave me:
Private Sub DateOfTour_Click()
If Me.DateOfTour.Value = DCount("*", "UnavailableDates",_
"Dates = #" & _
Me.DateOfTour.Value & "#") > 0 Then
Cancel = True
MsgBox "You cannot schedule an appointment on this date."
End If
End Sub
Nothing was happening when I entered a date that was listed in the
unavailable dates table. I then created another text box that would reflect
the date I chose in the first date box and added that code on the click
event. All I get now is "Compile Error: Syntax Error" I checked the spelling
of everything, but to no avail it still does not work.
I use a calendar control in a pop up menu to choose a date from the calendar
that is added to the Date of Tour box. Is there any way to just block certain
dates on the calendar rather than having a message box that pops up when you
choose an unavailable tour date?
Thanks A LOT!