Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 3211 Table in use

Status
Not open for further replies.

davper

Technical User
Apr 20, 2003
2
US
my subform relies on a table that needs to be refreshed each time the form is loaded. So Icreated this code to do just that:

<code>
Private Sub Form_Load()
On Error GoTo err_handler
DoCmd.SetWarnings False

DoCmd.RunSQL "DROP TABLE tbl_Checks_to_be_Claimed_Temp"
DoCmd.OpenQuery "mt_Checks_to-Be_Claimed"
Call ResetForm
DoCmd.SetWarnings True
Exit Sub

err_handler:
DoCmd.SetWarnings True
Select Case Err.Number
Case 3295
MsgBox ("Temp Table could not be dropped. All records may not be available")
Case Else
MsgBox ("Unexpected Error!" & vbCrLf & "Error Code: " & Err.Number & _
vbCrLf & Err.Description)
End Select
Exit Sub
</code>

I get the error at the drop table line.

I tried rebooting and making sure nothing opens upon opening the database. The subform recordsource is 'tbl_Checks_to_be_Claimed_Temp', but I am assuming the form_load event would run before the subform locks the table.

I have spent the last hour searching and trying different options but nothing seems resolve this error.

 
Yes of course...A simple function procedure that the switchboard calls instead of the form.

I have been at this application too long and am missing the simple things.

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top