Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validate field in table by condition based on another table.

Status
Not open for further replies.

multipleintell

Technical User
Dec 7, 2001
72
US
I have a table that I am registering class participants. The table is a middleman between a table of courses and a table of people. I want to make sure that i don't register more people in a course than the MaxReg, which is a number field. I also don't want to have to manually check the number of people in a course so that I don't overdo it.

I want to validate the CourseCode field in the registration table by checking the Count(IDentifier) -which is the Person's code, in the Registration table to the MaxReg field in the Course table.

Does this make sense to you? I am not sure if this is a possibility!

I am open to any other ideas, except anything having to do with a form. I am prefering at the moment to enter the registrations directly in the table.

Thanks,
Melissa
 
I guess you could try setting up a field in the Registration table as a CourseCounter. This field would be a number field and a combo box. The RowSource of the combobox could be a query that would link the Course(MaxReg) and a Count of the Registered persons for the Course field. It would give you the logical next Course Registration number up to by not exceeding the Max Registration.

Is this what you are looking for?

Get back with more specifics about the tables and I can help with the query.

Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top