Re: Object invalid or no longer set error involving database object. H

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



What's RD?
You have not set that to anything.

You've not included all of your code, but add the line:
Option Explicit
to the top of this module. Then choose Compile on the Debug menu. This should catch RD as an undeclared variable.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"rhc" <rhc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:855FD981-9B2D-42AC-AB85-7999260857B1@xxxxxxxxxxxxxxxx
im running access 2003 on xp. i have started seeing this bug in somve vba
routines where if I declare a dao database object then:
Set D = currentdb()
Set R = D.recordset(sSQL,dbOpenDynaset,dbSeeChanges)
loop through R updating rows.
R.close
Set RD.openrecordset(sSQL,dbOpenDynaset,dbSeeChanges)
Here I get the Object invalid or no longer set error. The database object D
seems to have become uninstantiated for no apparent reason. The only thing
that has changed recently in the code is the addition of the dbSeeChanges in
the recordset statements. I add these in to make the UI mdb the code is in
compatible with a sql server 2005 backend that im in the process of
developing. to be clear the above error happens wihen linked to the original
access mdb backend.
Could deSeeChanges cause this?
Is there a size limitation on the modules associated with forms? The ui mdb
as a lot of stuff in it but ithe file size is still only 12MB

Help!!!!

.



Relevant Pages