icemonster
Registered User.
- Local time
- Yesterday, 21:27
- Joined
- Jan 30, 2010
- Messages
- 502
so i have this string:
the thing is tmptbl_school is wihtin the ms access front end. so it keeps telling me that the table does not exist which makes a lot of sense, does anyone know how to correct my syntax?
Code:
strSQL = "INSERT INTO tbl_school " & _
"(school_name, school_degree, school_major, school_startdate, school_enddate) SELECT (school_name, school_degree, " _
& "school_major, school_startdate, school_enddate) FROM tmptbl_school;"
.Execute strSQL, , adCmdText + adExecuteNoRecords
strSQL = "SELECT Last_Insert_ID();"
With .Execute(strSQL, , adCmdText)
If Not (.BOF And .EOF) Then
' Found the new ID - build the second Insert SQL string
lngLastSchoolID = .Fields(0)
Else
' Abort
End If
.Close
End With
the thing is tmptbl_school is wihtin the ms access front end. so it keeps telling me that the table does not exist which makes a lot of sense, does anyone know how to correct my syntax?