Object invalid or no longer set :) Part2

  • Thread starter Thread starter Iryna Roy
  • Start date Start date
I

Iryna Roy

How do you perform the update? The union query is read-only, so presumably
you run an UPDATE query or similar? Does it make any difference if you
requery after the update, i.e.:
Me.Requery

I checked the versions of DAO, ADO, Jet and MSAccess files... everything is
the same on my computer and on the problem computer. Then I start to play
with code. And what I found out.

When I am doing:
Me.Requery
I have this message "Object invalid or no longer set"

When I am doing:
Me.recordSource = "Query Name"

It works fine without any error!
Could somebody explain me why it happens just on three computers from 20?
and why it happens.
Sure, I will change all code to Me.RecordSource = "QN" but it is interesting
to understand where is the reason?

Thank you so much
Iryna Roy
 
I start to play
with code. And what I found out.

When I am doing:
Me.Requery
I have this message "Object invalid or no longer set"

When I am doing:
Me.recordSource = "Query Name"

It works fine without any error!
Could somebody explain me why it happens just on three computers from 20?
and why it happens.
Sure, I will change all code to Me.RecordSource = "QN" but it is interesting
to understand where is the reason?

Thanks for your post!

I am running into the same error:
"Object invalid or no longer set"

It occurs intermittently, rarely, and unpredictably on
about 4 computers out of 20. It occurs just often enough
to drive the users mad.

Server is Win2000. Clients are all Access 2002 running on
WinXP. Application design is split, front-end on clients/
back-end data on server in 7 MDBs.

The error occurs only in one or two forms of hundreds in
the application. These happen to be very heavy forms,
with hundreds of controls and lots of code behind them.
There are several heavy subforms, too, nested only one
deep, however.

The code includes some:
<object>.Requery.

Based on your experience, I am rewriting that code as:

<object>.RecordSource = "<Query Name>"

or:

<object>.RowSource = "<Query Name>"

I am hoping this solves this very annoying problem (which
by the way, I did not have in an Access 95 version of this
application).

Are you still NOT getting this error anymore, since you
made the code change?

Thanks again,

Don Skolnik
 
Back
Top