By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,010 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

ADP: subform auto-requeries in endless loop

P: n/a
Hi All,
This one has me stumped. I hope someone else has seen this behavior
and knows what's going on.
I'm using Access 2003 ADP on Windows XP, database in 2002/2003 format,
with SQL Server 2000. Everything patched to latest version. This
happens both at work and at home.
My form is very similar in structure to the NorthwindCS Orders form: a
parent form with a subform in datasheet. The subform draws its data
from a view. The LinkChildFields and LinkMasterFields properties are
used to restrict the rows to what's needed for the parent values (1
field; datatype=smallint). I have a field in the footer of the subform
summing a Currency field, and a control on the parent that picks up
that value. There is no code in any important event.
The form requeries itself in an endless loop, about 5 times per
second.
Here is the kicker: if I resize the subform so all rows fit (i.e. no
vertical scrollbar), then the requery does not happen!

I can stop this behavior by taking out "=Sum([TargetAmount])" from the
ControlSource of the control in the footer of the subform. Taking out
the ControlSource of the control in the parent
(=[chiMain].[Form]![txtTargetTotal]) does not stop it.

Any insights much appreciated.

-Tom.

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Tue, 28 Dec 2004 20:29:50 -0700, Tom van Stiphout
<no*************@cox.net> wrote:
I found a work-around, but I don't yet understand why it happened in
the first place. The field in LinkMasterFields is a textbox, with a
controlsource of:
=[Forms]![frmStartup]![cmbFY]
to pick up the fiscal year from a dropdown list on another form.
Although the textbox displays its value just fine, replacing the
controlsource with:
=2005
stabilizes the form.

This also worked: setting the ControlSource to:
=GetFiscalYear()
and adding a function:
Private Function GetFiscalYear() As Integer
GetFiscalYear = [Forms]![frmStartup]![cmbFY]
End Function

I still have no idea why the first implementation did not work.

-Tom.
Hi All,
This one has me stumped. I hope someone else has seen this behavior
and knows what's going on.
I'm using Access 2003 ADP on Windows XP, database in 2002/2003 format,
with SQL Server 2000. Everything patched to latest version. This
happens both at work and at home.
My form is very similar in structure to the NorthwindCS Orders form: a
parent form with a subform in datasheet. The subform draws its data
from a view. The LinkChildFields and LinkMasterFields properties are
used to restrict the rows to what's needed for the parent values (1
field; datatype=smallint). I have a field in the footer of the subform
summing a Currency field, and a control on the parent that picks up
that value. There is no code in any important event.
The form requeries itself in an endless loop, about 5 times per
second.
Here is the kicker: if I resize the subform so all rows fit (i.e. no
vertical scrollbar), then the requery does not happen!

I can stop this behavior by taking out "=Sum([TargetAmount])" from the
ControlSource of the control in the footer of the subform. Taking out
the ControlSource of the control in the parent
(=[chiMain].[Form]![txtTargetTotal]) does not stop it.

Any insights much appreciated.

-Tom.


Nov 13 '05 #2

P: n/a
This is an intermittent bug with Access and calculated controls or conditional
formatting on correlated subforms. FWICT, it is not specific to ADPs. You've
already found the appropriate solutions.

On Tue, 28 Dec 2004 20:29:50 -0700, Tom van Stiphout <no*************@cox.net>
wrote:
Hi All,
This one has me stumped. I hope someone else has seen this behavior
and knows what's going on.
I'm using Access 2003 ADP on Windows XP, database in 2002/2003 format,
with SQL Server 2000. Everything patched to latest version. This
happens both at work and at home.
My form is very similar in structure to the NorthwindCS Orders form: a
parent form with a subform in datasheet. The subform draws its data
from a view. The LinkChildFields and LinkMasterFields properties are
used to restrict the rows to what's needed for the parent values (1
field; datatype=smallint). I have a field in the footer of the subform
summing a Currency field, and a control on the parent that picks up
that value. There is no code in any important event.
The form requeries itself in an endless loop, about 5 times per
second.
Here is the kicker: if I resize the subform so all rows fit (i.e. no
vertical scrollbar), then the requery does not happen!

I can stop this behavior by taking out "=Sum([TargetAmount])" from the
ControlSource of the control in the footer of the subform. Taking out
the ControlSource of the control in the parent
(=[chiMain].[Form]![txtTargetTotal]) does not stop it.

Any insights much appreciated.

-Tom.


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.