run time error 3420 need visual basic code

  • Thread starter Thread starter Via_Doug
  • Start date Start date
V

Via_Doug

I have linked tables to a database. Sometimes when a
query is run those tables are locked. This causes the
form built on the query to give a run-time error "3420":
object invalid or no longer set. When it is run using
the timing features. I update it every 30 sec's about
once an hour the error occurs. When looking at the
debug stuff in visual basic the Private Sub Form_Timer
area has "Form_Orders.Requery" highlighted.

I can not stop the tablets I am linked to from locking.
What I would like to do is when the form gets this error
get it to retry in 30 sec or so.

Does anyone know the proper code for doing this in Visual
basic?
 
Tables being "locked" (in the Access/Jet sense of the word) is nothing to do
with runtime error 3420. It sounds more like a coding error to me. What
leads you to say that the tables are "locked", what exactly do you mean by
that term, & why do you say that is causing your error?

HTH,
TC
 
Sometime when I run the Query the form is built on I get
an error from ODBC saying that the table is locked.

Where is the coding error? In VB?

Here is the code.

Private Sub Form_Timer()
Me.Timerinterval = 30000
Form_Orders_Requery
End Sub

The Form_orders_Requery is the Highlighted area after it
errors out.
 
The Whole code is:

Private Sub Form_Timer()
Me.Timerinterval = 30000
Form_Orders_Requery
End Sub

The formPorders_requery is a function.
 
It would be in the code module for the form, or in one of the other modules
shown on the "Modules" tab.

Sorry, I don't have Access on this PC, so I can not walk you through that
process :-(

HTH,
TC
 
Back
Top