maximum number

W

Whitepointer

I have a database which has a list of classes. I would like to add a maximum
number to that class. So someone can not add 11 to a 10 person class. I would
really like some help. Thank you,
 
G

Guest

hi,
not enought info to say anything specific.
but in the text box where the persons are added(before
update event), you will need code to sum the number of
persons already asigned to the class + the number of
persons someone is trying to add and if that exceeds 10
then display a message that the number of persons has
exceeded the limmit and exit sub.
key phrase - exit sub. that way the person trying to add
more will never get pass that point.
 
G

Graham R Seach

How are you adding people to classes? Do you have an "Add Student" form, or
do you add them using a continuous subform?

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
W

Whitepointer

When the database opens up, there is a form where you would book students
into their classes. That is probably not much help either. I hope you able to
make sense of this
 
G

Graham R Seach

Yes, you're right - it isn't much help.

How are you adding people to classes? I understand that you have a form to
do it, but exactly *how* do you use this form to add one or more students?

* Do you just hit a button, that executes some code or a query?
* Do you enter the total number of students into a text box?
* Do you enter each student's name into a textbox, and let Access add them
to the class when you move to another record?

If you want help, you have to give us something to go on!

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------
 
Top