Delete a backend table

  • Thread starter Thread starter JohnP
  • Start date Start date
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
 
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
 
Back
Top