conversion & 3420 error

G

Guest

have converted an Access97 to Access2003 (in 2000 file format) - much is
working ok but some command buttons are throwing the error:

Error Number 3420 - Object Invalid or no longer set

Have browsed around becoming educated on that....have looked at:
http://allenbrowne.com/ser-48.html#conversion

It isn't opening the VB window & showing me the compile line error - just
that message in an error box....so am wondering if anyone out there has run
up against this specifically and/or whether there is a method to zero in on
the trouble line of code.....

right now I suppose it is the 'OnClick' event code - but as there is alot of
code back there calling functions - including opening another form...it could
be in the open form or subform properties too I suppose....wish one could
focus in more easily on the trouble cause......

advice definitely welcomed...thnx...NTC
 
R

ruralguy via AccessMonster.com

Unhandled errors can couse this error. Is your system set to break on
unhandled error?
<ALT> F11 then Tools>Options...>General tab
I sometimes set mine to break on all errors to track down problems.
 
G

Guest

thank you for that - did change to 'all errors' and it now zooms into vb line
error rather than just a general message box....

now my dilemma is why 97 vb code doesn't work in 03 access...

the line in error is: rstQuote.AddNew

preceeding it the rstQuote is defined...and then set...without throwing an
error - and so I guess it is the .AddNew isn't valid....

probably the first of quite a few errors I need to correct and wonder what
is the reference to the correct vb...between older and newer versions ??
 
S

Stefan Hoffmann

hi,
now my dilemma is why 97 vb code doesn't work in 03 access...
the line in error is: rstQuote.AddNew
In Access 2003 there are two libraries providing a recordset class:

ADODB.Recordset and DAO.Recordset

Add the DAO 3.6 library to your references and change the declarations
of your recordsets to e.g.

Dim rstQuote As DAO.Recordset

then it should compile without errors.


mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top