i received a runtime error message 3346 when i ran the insert into
select code. i have check to see if the query values and destination
fields are the same and it appears so. atlas, i have no idea why my
insert into query does not work. if anyone has suggestions, it would
be appreciated. thanks in advance.
Set db = DBEngine(0)(0)
Set rst = db.OpenRecordset("ETracking")
If rst.RecordCount > 0 Then
Do While Not rst.EOF
db.Execute " INSERT INTO ETracking " _
& " ([ET Number], [ET LN Shortname], [ET Amount], [ET EC
Code])" _
& " SELECT(Max([ET Number])+1) AS [ET Number] FROM
ETracking), tblImportET.[ET LN Shortname], tblImportET.[ET Amount],
tblImportET.[ET EC Code] " _
& "FROM [tblImportET];"
rst.MoveNext
Loop
End If