Linking tables through a form

G

Guest

I have three tables EMPLOYEE, DATE (an associative entity), and TRAINING.
EMPLOYEE TO DATE is one to many, and DATE TO TRAINING is many to one.
DATE has a primary key from each of the other two tables.

I can set up EMPLOYEE as the main form. How do I create a subform so that I
can enter the completion date and the training course, and be able to view
all three at the same time? Is the only way to do this to get rid of my
associative entity DATE and stick the date in the TRAINING table, and only
then create the subform TRAINING?
 
J

John Vinson

I have three tables EMPLOYEE, DATE (an associative entity), and TRAINING.
EMPLOYEE TO DATE is one to many, and DATE TO TRAINING is many to one.
DATE has a primary key from each of the other two tables.

I can set up EMPLOYEE as the main form. How do I create a subform so that I
can enter the completion date and the training course, and be able to view
all three at the same time? Is the only way to do this to get rid of my
associative entity DATE and stick the date in the TRAINING table, and only
then create the subform TRAINING?

First off, be aware that DATE is a reserved word, for the Date() VBA
function. I'd suggest changing the name of your associative table to
TrainingDate.

Simply base your Subform on TrainingDate; you can put a Combo Box on
the form based on Training, to display the name of the training course
while storing the unique ID in the TrainingDate table. You can (if
need be) put code in the combo's Not In List event to bring up a
(separate) Training form to enter a new training class if the needed
classes have not yet been entered.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
G

Guest

Thanks John for your help, but now I have another question.

OK after I click the look up button next to Not In List then what do I do?
(Given that I have already created a form to add new training courses.)

Sincerely,
David
 

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