Hi Wheat,
Comments inline.
>All,
>
[quoted text clipped - 34 lines]
>Set db = ws.OpenDatabase("S:\Training Team\Training
>Analyst\Testing\Import Test.mdb", , False, True)
>Set rs = db.OpenRecordset("tblTest", dbOpenDynaset)
You don't need the recordset.
>strSQL = "INSERT INTO tblTest Values
>(intBPID,strAcct,strCSR,intQA,intScore,dtmDate)"
VBA doesn't interpolate (substitute) variables into strings like that.
You have to concatenate them explicitly and enclose string values in
single quotes (double quotes are optional)
strSQL = "INSERT INTO tblTest VALUES (" _
& intBPID & ",'" & strAcct & "','" _
& strCSR & "'," & intQA & "," & intScore _
& ",#" & Format(dtmDate, "mm/dd/yyyy") _
& "#);"
Then execute the query:
db.Execute strSQL, dbFailOnError
and finally tidy up
db.Close
>Set ws = Nothing
>Set db = Nothing
[quoted text clipped - 8 lines]
>
>Thanks in advance
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
Wheat - 05 Aug 2004 14:48 GMT
John,
Thank you for your help!
>-----Original Message-----
>Hi Wheat,
[quoted text clipped - 82 lines]
>Please respond in the newgroup and not by email.
>.