Assistance getting Junction table populated...

morfusaf

Registered User.
Local time
Today, 13:49
Joined
Apr 24, 2012
Messages
78
First off, thanks for your assistance ahead of time.

I am creating a database for Jobs(event) and who goes on each Job(people/person).

Currently I the following tables

tblEvents (EventID Primary key, Autonumber(this way it makes it for me))
tblPeople (PersonID Primary Key, Autonumber(Same reason))
tblPeopleAtEvent (PeopleAtEventsID Primary key, (Autonumber)).


Also,

I have the following relationships.

tblEvents -EventsID to EventsID on tblPeopleAtEvents)
tblPeople -PersonID to PersonID on tblPeopleAtEvents)


Also, each relationship defaults as a one-many relationship


Now I am creating forms.

I created my formAddPeople first, as I figured I need people inorder to populate who attends the event.

I created a formAddPeople, formDeletepeople, and formUpdatePeople... Easy as pie...

Now, I am moving on to the Create event form.

In this form I need to be able to input all the information about the event (date, location, POC, vehicle used... blah blah) and be able to select who all attended this event, ( I will also like to add things such as, was this person a Job Supervisor, what was this persons Job?....

I figure once I get to that, I will have an Add Person to event section, where I click a combo box, select a person then it populates below or next to and I can click check boxes for Supervisor or not, then an add another person to this job button, that populates below that one, and same thing with supervisor check box... (anyway this will take place after I figure out how to get the dang junction box to at least populate who goes just by using a selection box. Once I get that down then I will work on the other parts.

So, I know how to handle the infomration for the event, but now how do I add the people? I am pretty sure I need to do mainform/subform, I currently am thinking I need to do a formCreatEvent as the Mainform (bound to the tblEvents) then do a subform... But which tbl should I use? and how do I link it all together in the Junction table?
I am not really wrapping my head around this junction table/subform process.

So right now, I have a formCreateEvent ... which just creates the event, so I assume I need to add a subform but how do I do this, and how do I get it to populate whom all I select went on the job?

Thanks again for any help.

 
Also, which form would I put the Add Record button in? the main form or subform?
 
With the subform you shouldn't really need one. As long as they are linked properly, when you go to a new record on the main form the subform will be synced with it. You would just go down the subform (in continuous or datasheet view) and add people by selecting from a combo that got its selections from the people table.
 

Users who are viewing this thread

Back
Top Bottom