Error 3420

  • Thread starter Thread starter TonyT
  • Start date Start date
T

TonyT

Hi,

I get the following error message on just one PC (out of 6
identical - the rest work fine);

'Object invalid or no longer set'

the error occurs upon reaching Me.Requery at either of
it's 2 locations in the forms code, if I go to debug and
do nothing the prompt reappears after 30 seconds or so and
will continue appearing when no code is running in debug
mode.

the same code has been working on all PC's for 9 month's
or so absolutely perfectly.

Access 2000, W2K, all references listed, Jet4.0 to sp8,
vbrun60sp5 all re-run.
Help!

TonyT
 
Hi Tony. Was going to say service packs, and I think it is still worth
tracking down msjet40.dll on the problem machine, making sure there is only
one file anywhere on path and that is is version 4.0.8xxx. (Presumably you
have SP3 for Office 2000 on all machines also.)

If that does not solve the problem and it is a concurrency issue, you may be
able to avoid it by explicitly saving the record before the requery:
If Me.Dirty Then
Me.Dirty = False
End If
Me.Requery

If that still does not solve the problem, are there any memo fields,
hyperlinks, or OLE objects in this form/subform? Does avoiding them solve
the problem? If so, can you pin-point the concurrency issue there?

There is one other cause of that error, and it has to do with closing the
objects that Access has open by default. For example we sometimes see people
pointing a variable to the default workspace (for a transaction), and then
cleaning up their code by closing the default workspace. Access just
silently reopens it, but any objects that were dependent on it go out of
scope, including the RecordsetClone of any form that was open at the time
(and had referred to its RecordsetClone). You then see Error 91 until you
close and reopen the form. The solution is to close *only* what you open,
but set all your objects to Nothing.
 
Are you sure that the form's code is not closing itself (via docmd.close or
whatever) and then executing the me.requery after it has done that?

HTH,
TC
 
Hi,

I did manage to work around the problem in 2 ways, either
by removing Me.Requery, which allowed the data to be added
OK, but didn't display the new data on the form. Secondly
by removing the memo field in the underlying query & the
form, but felt neither were satisfactory long term
solutions.
I think the .dll route is far more likely a cause as the
same code has never caused problems on 20 or so other PC's.
I was about to run 'Decompile' thru 'start'/'run' when the
dreaded word 'regedit' appeared in the 'run' box, so god
only knows what the user has been doing before I got there!

thanx,

TonyT.
 
Back
Top