Make table query - sql

Spelthorne1

Registered User.
Local time
Today, 10:41
Joined
Feb 17, 2004
Messages
20
I have an make table query where i would like the users to choose a name for the table in the backup database.

Code:
Dim strtbl As String

strtbl = "WC26Apr"
Set qdf = db.QueryDefs("Backup")
        strSQL = "SELECT WC16Feb.*, * " & _
                     "INTO  & strtbl &  IN   & T:\data.mdb  " & _
                      "FROM WC16Feb;"
qdf.SQL = strSQL
 
The syntax is not correct.
Dim strtbl As String

strtbl = "WC26Apr"
Set qdf = db.QueryDefs("Backup")
strSQL = "SELECT WC16Feb.* " & _
"INTO " & strtbl & " IN " & " T:\data.mdb " & _
"FROM WC16Feb;"
qdf.SQL = strSQL
 
Pat Hartman said:
The syntax is not correct.

Thanks pat.
I didnt realise that i'd submitted the thread. I was gonna write a little more explanation rather than just demanding an answer!! Its annoying when theres just a ' missing. Its good to have a fresh eye looking over the code - i couldnt see for trying!
 

Users who are viewing this thread

Back
Top Bottom