J
Joe Williams
I am trying to create a blank copy of a BE database via code. I have a
button which calls the open file dialog and allows the user to enter a
filename and location for the new database. Then I execute the CreateaDabase
code as follows:
Set dbNew = CreateDatabase(NewDBLoc, dbLangGeneral)
dbNew.Close
This creates a new database with the location and filename as specified in
NewDBLoc. No problem. Then I try to copy the STRUCTURE ONLY of the exisiting
tables to the new database with the following code:
DoCmd.TransferDatabase(acExport, , NewDBLoc, acTable, "Staff", , -1) where
Staff is the table name, dbNewLoc is the newly created database, and -1 is
the switch to copy structure only. Should work! But when it executes this
line of code I get the following error:
"The type isn't an installed database type or doesn't support the operation
you chose"
Can anyone help my find the error in my ways or provide another way to copy
the structure of the tables from the current BE to the newly created BE?
Thanks
Joe
button which calls the open file dialog and allows the user to enter a
filename and location for the new database. Then I execute the CreateaDabase
code as follows:
Set dbNew = CreateDatabase(NewDBLoc, dbLangGeneral)
dbNew.Close
This creates a new database with the location and filename as specified in
NewDBLoc. No problem. Then I try to copy the STRUCTURE ONLY of the exisiting
tables to the new database with the following code:
DoCmd.TransferDatabase(acExport, , NewDBLoc, acTable, "Staff", , -1) where
Staff is the table name, dbNewLoc is the newly created database, and -1 is
the switch to copy structure only. Should work! But when it executes this
line of code I get the following error:
"The type isn't an installed database type or doesn't support the operation
you chose"
Can anyone help my find the error in my ways or provide another way to copy
the structure of the tables from the current BE to the newly created BE?
Thanks
Joe