How to Delete Hidden Table in Back-end

  • Thread starter Thread starter Bill Sturdevant
  • Start date Start date
B

Bill Sturdevant

I am linking from a front-end to a back-end replica quite
successfully. However, there is one table that conflicts
occur in and I don't want to be bothered by those. The
replication FAQ says to delete that file before I try to
resolve conflicts.

I have been unable to do that programmatically. The table
is created automatically by Access and is hidden.

The following code does not delete it. It fails without
an error message.

Dim db As Database
Set db = CurrentDb()
db.TableDefs.Delete "Tbl_XXXXXXXXXX_Conflict"
db.Close

What am I missing?
 
The following code does not delete it. It fails without
an error message.

Dim db As Database
Set db = CurrentDb()
db.TableDefs.Delete "Tbl_XXXXXXXXXX_Conflict"
db.Close

What am I missing?

The table is located in the back-end, right? Your code is only looking in the
front-end (CurrentDb). You need to use the "OpenDatabase()" method to set "db"
to the back-end database file, then delete from db's tabledefs collection.
 
Back
Top