I want to create a temporary table with the SQL "CREATE TABLE" option within VBA and use the Execute command instead of DoCmd.RunSQL. I just want the Table structure without any records. The code fails on the Execute command. I can not see anything wrong with this code. Please help
Dim db As DAO.Database
Dim strSQL As String
Set db = DBEngine(0)(0)
strSQL = "CREATE TABLE tbl_ImportTemp (Entered Date DATE,Transactions TEXT, " & _
" Amount CURRENCY, Balance CURRENCY, Category TEXT, Cost_Code NUMBER );"
db.Execute (strSQL)
Set db = Nothing
:banghead:
Dim db As DAO.Database
Dim strSQL As String
Set db = DBEngine(0)(0)
strSQL = "CREATE TABLE tbl_ImportTemp (Entered Date DATE,Transactions TEXT, " & _
" Amount CURRENCY, Balance CURRENCY, Category TEXT, Cost_Code NUMBER );"
db.Execute (strSQL)
Set db = Nothing
:banghead: