I am trying to export data directly from a form in an adp to a table in an mdb with VBA. (Don't ask me why, it's a long story!) Anyway I have the following code:
Dim strSQLTransmit As String
Dim strpat_last As String
strpat_last = Me!txtpat_last
strSQLTransmit = "INSERT INTO tblMain2 ( pat_last ) " & _
" IN '\\vo-tr-SQL02\AppDev\NCDenialLetters\NCDenialLettersReporting.mdb' " & _
"Values ('” & strpat_last & “’)"
A command button kicks it off. The code works great when used within an mdb, but not from an adp. I get an error saying that there is a syntax error near the word 'IN'. Can anyone help?
Dim strSQLTransmit As String
Dim strpat_last As String
strpat_last = Me!txtpat_last
strSQLTransmit = "INSERT INTO tblMain2 ( pat_last ) " & _
" IN '\\vo-tr-SQL02\AppDev\NCDenialLetters\NCDenialLettersReporting.mdb' " & _
"Values ('” & strpat_last & “’)"
A command button kicks it off. The code works great when used within an mdb, but not from an adp. I get an error saying that there is a syntax error near the word 'IN'. Can anyone help?