I have an Append Query that is adding the data twice. Why would this be?
Posted on 2003-12-07
I have an append query to update a table with certian information which the user chooses via form. When you run the query it adds the data twice. I cannot see why. Any ideas?
INSERT INTO Training ( EmplID, CertID, CompCatID )
SELECT Employee.EmplID, PositionCompetency.CertID, PositionCompetency.CompCatID
FROM Employee INNER JOIN (PositionCompetency INNER JOIN Certification ON PositionCompetency.CertID = Certification.CertID) ON Employee.PosID = PositionCompetency.PosID
WHERE (((PositionCompetency.CertID)=[Enter CertID to Add]) AND ((PositionCompetency.PosID)=[Enter PosID to Update]));
Code on click event of button of form to run the query.
Private Sub Command14_Click()
On Error GoTo Err_Command14_Click
Dim stDocName As String
stDocName = "UpdateCerttoTrain"
DoCmd.OpenQuery stDocName, acNormal, acEdit