Limit Number of Entries

hobbes

Registered User.
Local time
Today, 02:21
Joined
Feb 13, 2004
Messages
30
How do I limit the number of entries made by a user on a form? I'm designing a database that will show available classes and let people sign up for them. However, there are a limited number of seats for each class. How do I keep people from signing up for a class if all of the seats are taken?

Thank you!!!
 
There could be a number of methods. Assuming you're using a continuous subform which displays one class, one approach could be to use then on current event of the subform. Let's say the max number is present in the main forms txtMax control, try something like this:

if me.recordsetclone.recordcount >= clng(me.parent.form!txtmax) then
me.allowaditions = false
else
me.allowadditions = true
end if
 

Users who are viewing this thread

Back
Top Bottom