
Psychologist Needs Help, Export Table to A:drive
I am a psychologist/novice VB programmer and having trouble exporting a
table to an A:drive. using VB front end, ACCESS back end
Here is what i am trying
First I do a make table from the table where I collect the data into a
table to export then I check and see if there is a database on the disk in
A and delete if so, then create the database then try and do a make table
into that database. I can get the make table to work in the same atabase
but when I try and get it to make a table into the new data base i get this
error:
run time error 3067
Query input must contain at least one table or query
Here is the code if anyone can see what is wrong with it:
'this works OK to make table in the main database
AssessDB.Execute "SELECT TBLIntakeOutcome.* INTO " _
& "[TBLIntakeOutcomeExport] FROM TBLIntakeOutcome;"
AssessDB.Execute "Delete * FROM TBLIntakeOutcome"
If Dir("A:\ExportDB.mdb") <> "" Then
Kill ("A:\ExportDB.mdb")
End If
Set dbsNew = AssessWS.CreateDatabase("A:\ExportDB.mdb", _
dbLangGeneral, dbEncrypt)
'This is the code that the error occurs in
run time error 3067
Query input must contain at least one table or query
assessDB.execute "SELECT TBLIntakeOutcomeExport.* INTO " _
& "[TBLIntakeOutcomeExport]" & " [IN " & ("A:\ExportDB.mdb") & " ]
FROM TBLIntakeOutcomeExport