Limiting records and restricting duplicates

M

Maggie

Hi there,

I am creating a database of 34 camps. Each camp has a
limited number of individuals it can accept. I want to
preset a maximum number of records for each camp. So say
if a camp can only take 50 people, I want on the 51st
person to say camp at max. But this is only limited to
campers and not staff.

Secondly.. I need to make sure that each camper can only
register for one camp...

Thanks

M~
 
T

Tom

----- Maggie wrote: -----

Hi there,

I am creating a database of 34 camps. Each camp has a
limited number of individuals it can accept. I want to
preset a maximum number of records for each camp. So say
if a camp can only take 50 people, I want on the 51st
person to say camp at max. But this is only limited to
campers and not staff.
I think you need to limit this at the form level - in the form where you enter the camp of the camper insert the following lines in the before update event:

"If dcount("camper","camper-table","[camp_no]=" & Me!camp_in_form) = 50 then
msgbox "Camp " & Me!camp_in_form & " is full"
cancel = true
me.undo
End if

Secondly.. I need to make sure that each camper can only
register for one camp...

Just make a field in the camper's table - camp_no

Thanks

M~
 

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