Here is the formula used.
Private Sub AppointmentDate_BeforeUpdate(Cancel As Integer)
If DCount("*", "Front Desk", "AppointmentDate = #" &
Me.txtAppointmentDate
&
"#") >= 40 Then
MsgBox "Class is full. Please pick another date or cancel the entry."
Cancel = True
End If
End Sub
:
Is the AppointmentDate field in the table defined as a Date/Time data
type?
Will you post the code as you currently have it? Does it allow you to
make
the entries for the 41st record, but not save them or does it save
them?
--
Wayne Morgan
MS Access MVP
"(e-mail address removed)" <
[email protected]>
wrote
in
message I got rid of the compile errors, now when i get to 41 records it
still
allows
me to keep adding on a specific date. I s there a way to get this
formula
to
work? Table Name "Front Desk" Column Name "AppointmentDate" Please
help!!!!!!