Full Version: Populating a table with a form
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
mclary
I'm not sure I've got the right forum, but here it goes.

I got tasked with creating a quick and dirty registration system for a seminar and I've run into a problem.

I have a table with the class ID, the class name, max class size, and current size.

I have a table with the attendee's ID, the class ID, their first name, and their last name.

I created a quick query to tell me which classes are not full and used it on a form to create a drop down of classes that are not full.

The problem is that I do not have a list of attendees (ie, walk ups), so I created a data entry form that will let me input their first and last name so they can be registered.

When the class is selected, I created a button called "Register" so when you click on it the data entry form pops up. Also on this form is a text box that has the Class ID from the open class selected from the open class form.

My thought was after the data entry was complete, the form would update the attendee's class ID record with the class ID value from the form, and then increment the current size by 1.

I've realized that when a new name is entered, the record won't be created in the attendee until the form is closed or you navigate to a new record on the form.

Given that, how do you pass these other two values to the appropraite records?

Thanks.
Jack Cowley
"I have a table with the attendee's ID, the class ID, their first name, and their last name." You do not want the First and Last names in this table. Just the two ID's as the first and last name is available if/when you need it.

You can have a form based on your Attendee table and a subform based on the table with AttendeeID and ClassID. The link between will be AttendeeID and ClassID in the subform will be a combo box based on the Class table so you can select the class the user wants to attend... So you add a person the the main form and then in the subform, on a new record select the Class and that should do the trick...

This should do what you want, but you will need code to increase the count, though you should not need a field for how many have signed up as you can count the records...

hth,
Jack
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.