limit number of records accepted with a yes/no input and also an email from access question

A

abrussell

I am making a registration form/ database. The users enter their name
and email address, and then select 3 different courses, then submit to
add their record to the databas. I havethe courses listed with check
boxes. I'd like ot limit the number of people who can sign up for each
course. Anyone know how?

Also, I'd like the user to receive a conformation email to the address
they provide when they submit their form. Is this possible?
 
J

jahoobob via AccessMonster.com

General concept. I would use three tables.

tblClasses
ClassID - PK
ClassName
ClassDescription
MaximumEnrollment

tblOfferedClasses
AvailableClassID - PK
ClassID - FK
ClassDates

tblEnrollment
OfferedClassClassID -FK (from tblAvailableClasses)
StudentName or StudentID if you have a table with student ifno in it

One query to supply a combobox that feeds the OfferedClassID for the
enrollment form

SELECT DISTINCTROW tblEnrollment.ClassID, Count(*) AS Enrolled, tblClasses.
MaximumEnrollment, tblOfferedClasses.ClassDates, tblClasses.ClassName,
[MaximimEnrollment]-Count(*) AS Expr1
FROM (tblEnrollment LEFT JOIN tblOfferedClasses ON tblEnrollment.
OfferdClassID = tblOfferedClasses.OfferedClassID) LEFT JOIN tblClasses ON
tblOfferedClasses.ClassID = tblClasses.ClassID
GROUP BY tblEnrollment.OfferedClassID, tblClasses.MaximumEnrollment,
tblOfferedClasses.ClassDates, tblClasses.ClassID
HAVING ((([MaxEnrol]-Count(*))>0));
Hope this helps,
Bob
 

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