purpledawn
Programmer
Hi everyone.
I want to delete all tables from the application I'm creating every time the user runs a particular form. I'm using the code:
For Each tbl In dbs.TableDefs
DoCmd.DeleteObject acTable, tbl.Name
Next
But this give me an error (Run time error 3211) that basically says that the program can lock a System table (MSysAccessObjects) because it's being used by another person or process.
This error occurs regardless of whether there are any tables.
Does anyone know what the problem is?
I want to delete all tables from the application I'm creating every time the user runs a particular form. I'm using the code:
For Each tbl In dbs.TableDefs
DoCmd.DeleteObject acTable, tbl.Name
Next
But this give me an error (Run time error 3211) that basically says that the program can lock a System table (MSysAccessObjects) because it's being used by another person or process.
This error occurs regardless of whether there are any tables.
Does anyone know what the problem is?