Hi All,
I am having problems filtering a list box contents.
I have 5 combo boxes to filter down the list box contents. There are some make table queries and delete table actions going on when the filter is applied.
Problem is is that when i filter the list and there are no results to show i sometimes get this message: runtime error 3211. the database could not lock the table 'tablename' because it is already in use by another person or process.
here's what i've got...
The highlighted area is where the error kicks in. I am deleting then creating a table from 1 crosstab. Then i create and delete a second table from a crosstab based on the first table (confused?)
Is there a way i can unlock the table as it clearly isn't in use by anyone/anything?
Many Thanks.
I am having problems filtering a list box contents.
I have 5 combo boxes to filter down the list box contents. There are some make table queries and delete table actions going on when the filter is applied.
Problem is is that when i filter the list and there are no results to show i sometimes get this message: runtime error 3211. the database could not lock the table 'tablename' because it is already in use by another person or process.
here's what i've got...
Code:
'PT1: delete existing table and create new tables based on crosstab
DoCmd.SetWarnings False
If TableExists("Table1") Then
Me.lst_Skills_Lookup.RowSource = ""
CurrentDb.TableDefs.Delete ("Table1")
End If
'run the make table query
DoCmd.OpenQuery "qry_Make_Crosstab_Table"
DoCmd.SetWarnings True
'PT2: delete existing table and create new tables based on crosstab
DoCmd.SetWarnings False
If TableExists("Table2") Then
Me.lst_Skills_Lookup.RowSource = ""
[COLOR="Red"] CurrentDb.TableDefs.Delete ("Table2")[/COLOR]
End If
DoCmd.OpenQuery "qry_Make_Crosstab_Table2"
DoCmd.SetWarnings True
The highlighted area is where the error kicks in. I am deleting then creating a table from 1 crosstab. Then i create and delete a second table from a crosstab based on the first table (confused?)
Is there a way i can unlock the table as it clearly isn't in use by anyone/anything?
Many Thanks.