Delete a backend table

J

JohnP

Using code the frontend, I can copy a table from the frontend to the
backend and create the table link using the following commands

DoCmd.TransferDatabase acExport, "Microsoft Access", strBeDb, acTable,
"TableInFE", "TableInBE", False
DoCmd.TransferDatabase acLink, "Microsoft Access", strBeDb, acTable,
"TableInBE", "TableLink"

where strBeDb = pathname of the backend

Is it possible to use code in the frontend to delete a table in the
backend? For example. for table "tblSerial" I used

DoCmd.RunSQL "DROP TABLE tblSerial;"

I also tried the following

Set db = OpenDatabase(strBeDb)
db.Execute "DROP TABLE " & strTable & ";"

In both cases the link gets deleted but not the table in the backend.

Any ideas?

Regards,
John
 
O

o;;

JohnP said:
Using code the frontend, I can copy a table from the frontend to the
backend and create the table link using the following commands

DoCmd.TransferDatabase acExport, "Microsoft Access", strBeDb, acTable,
"TableInFE", "TableInBE", False
DoCmd.TransferDatabase acLink, "Microsoft Access", strBeDb, acTable,
"TableInBE", "TableLink"

where strBeDb = pathname of the backend

Is it possible to use code in the frontend to delete a table in the
backend? For example. for table "tblSerial" I used

DoCmd.RunSQL "DROP TABLE tblSerial;"

I also tried the following

Set db = OpenDatabase(strBeDb)
db.Execute "DROP TABLE " & strTable & ";"

In both cases the link gets deleted but not the table in the backend.

Any ideas?

Regards,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top