Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export to export from adp form to mdb table using VBA

Status
Not open for further replies.

TomGruett

MIS
May 6, 2004
4
US
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top