Joe Hecht
jmhla at earthlink.net
Sat Nov 20 22:58:11 CST 2004
I am working on an inherited database.
The original database there was a 1->1 relationship between employees and
job titles.
At the request of the client, I have made a 1->many relationship between
employees and job titles.
This sql was the after update to the form:
INSERT INTO TrainDate ( EmpID, DocID )
SELECT Employee.EmpID, JobDoc.DocID
FROM Employee INNER JOIN JobDoc ON Employee.JobTitleID = JobDoc.JobTitleID
WHERE (((Employee.EmpID)=[Forms]![Employees]![EmpID]) AND
((Employee.JobTitleID)=[JobDoc].[JobTitleID]));
I need to know please:
1. Where do I put the sql statement to check each record on the
subform.
2. How do I ensure it does not add duplicate records if a
potentional situation
a. existing employee is in the system
b. if they are assigned a second or more job title
Hope this is clear.
TIA
JOE HECHT
LOS ANGELES CA
jmhla at earthlink.net