Need Help - Junction tables?

motscotland

Registered User.
Local time
Today, 02:00
Joined
Oct 29, 2003
Messages
19
Hi,
I am trying to make a sub form that will show ALL the qualifications for an employee on the main Employees details form. The qual details are held in seperate tables.
I can make a subform that shows each record singly but it doesnt tally with the record showing on the main form.
How do I
a) get the subform to show ALL relevant qualifications for each employee?
and
b) synchronise the subform to show details of the same employee as is on the main form?

I was advised about Junction Tables in another thread but was not clear about how to implement one!

Thanks in advance,
MoT
:confused:
 
And here's the exact same example modified only in names to show qualifications.
 

Attachments

Thx - making headway now!!
Cheers,
MoT
:(
 
Hi Mile-O,

I downloaded you sample database dbqualifications97.zip. It indicates my situation very closely except that I have a listbox in place of your combo box. When I attempt to save a record in the subform (both in your sample & in my own), it tells me that it cannot be saved because "index or primary key cannot contain a Null value". I know from searching other threads that VBA coding is needed to correct this. Problem is...I can't find any threads which shows me exactly what that VBA coding is. I have SEVERAL subforms containing similiar "junction" tables in my database that I cannot complete because they need this coding. Could you, or anyone else, p-l-e-a-s-e give me a sample of the VBA code that I need. I have a main "person" table, a "language" table, and a "person/language" junction table which are set up very similiar to your sample tables. My MultiSelect listbox is on a subform (like your combo box) and allows the user to select multiple languages (which I believe is suppose to result in multiple records for each person). Just like with yours, I am able to make the multiple selections, but I can't get it to save those selections. Your sample ihas the subform in datasheet view whereas mine is in form view.

Also, I could not make the drop-down list work using an SQL statement based on my tables. I had to end up creating a query based on the actual list. Otherwise, all I get is the "default" choice rather than being able to choose from the entire list. I'll use your sample to go back & check everything. Perhaps I've entered something else wrong somewhere. I thnk that the subform is linked correctly to the main form because I created the main form first, then while in Design View of that Main form, I used the Form Wizard to create the subform...so I'm assuming that the Wizard linked the subform to the main form.

I would greatly appreciate your (or anyone's) assistance,

USEN
 

Users who are viewing this thread

Back
Top Bottom