recordset clone error message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a form with a linked sub form on it. When i click through the records
using the record navigator buttons, it says "calculating" in the status bar
at the bottom of Access. But if i try to move to the next record before it
has finished "calculating", I get an error message:
"cannot open a form whose underlying query contains a user-defined fuction
that attempts to set or get the form's RecordSet Clone property"

this is news to me as I wasnt aware I was doing anything to do with the
clone property. Then MS Access shuts down because it encountered a problem
Does anyone have any idea what could cause this error message and how to
avoid it?

Thanks for your help

Cheers
 
The underlying question is: What is causing this calculating?

Examples of things you might look for:

1) Is the form loading an image control? If so, it may be this bug:
Image Control may cause a GPF when browsing between records
at:
http://www.mvps.org/access/bugs/bugs0044.htm

2) Are you using conditional formatting? That can trigger endless
"Calculating", esp. if you use it with a calculated control.

3) Is there any code in the Current event of the form?

4) Is the form based on a query? If so, are there any functions used in the
query?

5) Are there any calculated controls on the form? Could any of these be
referring to a function or property that could trigger the message.
 
Hi,

thanks for the reply!
In answer to your points, there is no image control, no underlying VB code,
calculated controls etc.
The main form has as its record source:
SELECT * FROM [MAIN CBA VALIDATION] WHERE [MAIN CBA VALIDATION].Application
in (Select application from [Qry MAIN SIR Sir Without Matching MAIN]);

the query in the select clause is a join of 2 other queries, one query being
a group by of a table, the other being a group by of another table.

when the subform isnt there it doesnt say "calculating" between each record
so i suspect the suform is to blame!

The record source of the subform is one of the 2 grouping queries used
above- could this be the problem?

the effect I am trying to create is:
on the main form, display only those records from the main table where there
is a matching entry in the subform, eg if nothing in the subform, I wouldnt
want to display it at all.
This is why i have used the select statement in the main form.
the sub form query returns rows from the sub table where the cost field does
not match the cost field in the main table. therefore it allows the user to
see the rows where they arediferent and update the main table to the new
value if they choose.

The problem seems to only happen if 2 people are in the form at the same
time. Could it be that when someone changes the data in the main form to be
the same as the sub form (effectively removing that record from the ones to
be displayed) that something goes wrong?

Im certainly very puzzled by this

Thanks for your help
 
Okay: 4 more factors:

1. Multiple users
You say the problem only occurs when multiple users are in the form at the
same time. Is the application split so that each user has their own copy of
the front end? If not, that would be the first thing to try.

2. Cyclic dependency
You do have queries here that depend on other queries that depend on the
data in the form, so it at least has the potential to trigger endless
recalculation. There may be a way to avoid this?

3. Subquery
It is *very* easy to crash JET with subqueries, esp. when they are used as
input to further queries. Is there are way to recast this so as to use an
INNER JOIN instead of a subquery? This article illustrates how to
dynamically set the RecordSource of a main form to an INNER JOIN statement
so that it contains only those records that have a match in the subform:
http://members.iinet.net.au/~allenbrowne/ser-28.html
You may be able to take this approach with some of the lower level queries
as well?

4. Subform
I don't think we established your version here, but in Access 2002 and 2003,
a form can begin crashing for no apparent reason if its subform, and the
field(s) nominated in its LinkChildFields are not represented by controls in
the subform. AFAICT, the bug is related to objects of the undocumented type
AccessField. You can avoid this by adding a text box to the subform for the
foreign key and set its Visible property to No. Access then interprets the
name as referring to a Textbox instead of an AccessField, and the bug is not
triggered.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

confused said:
thanks for the reply!
In answer to your points, there is no image control, no underlying VB
code,
calculated controls etc.
The main form has as its record source:
SELECT * FROM [MAIN CBA VALIDATION] WHERE [MAIN CBA
VALIDATION].Application
in (Select application from [Qry MAIN SIR Sir Without Matching MAIN]);

the query in the select clause is a join of 2 other queries, one query
being
a group by of a table, the other being a group by of another table.

when the subform isnt there it doesnt say "calculating" between each
record
so i suspect the suform is to blame!

The record source of the subform is one of the 2 grouping queries used
above- could this be the problem?

the effect I am trying to create is:
on the main form, display only those records from the main table where
there
is a matching entry in the subform, eg if nothing in the subform, I
wouldnt
want to display it at all.
This is why i have used the select statement in the main form.
the sub form query returns rows from the sub table where the cost field
does
not match the cost field in the main table. therefore it allows the user
to
see the rows where they arediferent and update the main table to the new
value if they choose.

The problem seems to only happen if 2 people are in the form at the same
time. Could it be that when someone changes the data in the main form to
be
the same as the sub form (effectively removing that record from the ones
to
be displayed) that something goes wrong?

Im certainly very puzzled by this

Thanks for your help
Allen Browne said:
The underlying question is: What is causing this calculating?

Examples of things you might look for:

1) Is the form loading an image control? If so, it may be this bug:
Image Control may cause a GPF when browsing between records
at:
http://www.mvps.org/access/bugs/bugs0044.htm

2) Are you using conditional formatting? That can trigger endless
"Calculating", esp. if you use it with a calculated control.

3) Is there any code in the Current event of the form?

4) Is the form based on a query? If so, are there any functions used in
the
query?

5) Are there any calculated controls on the form? Could any of these be
referring to a function or property that could trigger the message.
 
Back
Top