try the following code in the checkbox control's BeforeUpdate event, as
If Me!CheckboxControlName Then
If DCount(1, "QueryName") = (max number allowed) Then
Cancel = True
Msgbox "This workshop is full."
End If
End If
replace CheckboxControlName with the actual name of the control. replace
(max number allowed) with the number or the reference to wherever you're
storing the number, and leave out the parentheses. replace QueryName with
the name of your query that counts the checkmarked records.
hth
<mi************@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
I'm trying to limit the number of records that can have a checkbox
clicked. I created a query that counts the number of records with that
checkbox clicked and tried to make a form validation expression "(Count
total of field) <= (maximum number of records permitted to have this
checkbox clicked)" and it doesn't work. Help!
I also tried using a Count function expression, but that didn't work,
any ideas?
Basically, I'm setting up a registration DB for a conference, and need
to limit the number of people who can register for particular workshops.