Runtime error 3211. Table is already in Use. When deleting table.

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi, I have a combobox whose rowsouce is in a table column..
When i try to delete the table it says it is locked by another user. How can i make this work. I need to delete the table and import it again at times even when the form is open.

Thanks in advance.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi Pedie,

you need to close the form and the reopen the form.

You can use the code below, you need to place this in a module, not in the code of the form.

Code:
Public Sub ReopenForm(ByVal sFrmName As String)
DoCmd.Close acForm, sFrmName
'delete the table
DoCmd.OpenForm sFrmName, acNormal
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top