Multiple Subform - Endless Loop Problem

  • Thread starter Christopher J. Babb
  • Start date
C

Christopher J. Babb

Here's my problem...

1 main form with 3 subforms.

The subforms are derived from queries.

Subform 1 is populated by selecting from a combo box on the main form. The
value of the combo box is linked to Subform 1 via Master/Child fields.

Selecting a record in Subform 1 populates a text box (Text1) on the main
form.

Subforms 2 & 3 are linked to the main form using Master/Child fields. Text1
is used as the Master Field.

All of this works exactly as I wish and displays all of the appropriate
values in all 3 subforms.

The problem I am having is that while the proper data is displayed, the form
seems to go into an endless loop and displays 'Calculating' at the bottom of
the main form. The cursor continuosly flickers as does all the data int he
subforms. It doesn't lock up the form as when I select a record in Subform
1, it displays the proper values in Subforms 2 & 3.

Can anyone shed any light on this problem?

Thanks,

Chris
 
A

Allen Browne

Are any of the forms using conditional formatting? If so, see:
Conditional formatting flaws
at:
http://members.iinet.net.au/~allenbrowne/bug-05.html

If it is not that, what event procedures are in use? Code in Form_Current
could be particularly interesting.

Another possibility: are any calculated fields named in
LinkMasterFields/LinkChildFields?
 
C

Christopher J. Babb

No contitional formatting on this form or in any subforms.

All subforms are being shown in datasheet format

The Master field for Subforms 2 & 3 is a text box on the main form that is
pulling a value from Subform 1 as follows:
=[frmClassesInSelectedSemesterSubform].[Form]![Class_Name_ID]

I have not entered anything in any event field on the subforms or main form.

Should have mentioned all of this in the original posting.

Thanks..

Chris
 
A

Allen Browne

Okay, so subform 2 and subform 3 have a dependency on subform 1. Now we are
looking for anything that could make Access believe that dependency is
cyclic.

If that is unproductive, you could try setting the LinkMasterField for #2
and #3 to:
[frmClassesInSelectedSemesterSubform].[Form]![Class_Name_ID]
instead of the text box, and then in the Current event of subform 1, requery
the other to:
Me.Parent![Sub2].Requery
That's how Microsoft sets it up in Northwind's Customer Orders form.

If that still doesn't work, would it be possible to drop the
LinkMasterFields/LinkChildFields entirely, and set the RecordSource property
of subforms 2 and 3 directly in the Current event of subform 1? That should
circumvent any dependency.

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

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

Christopher J. Babb said:
No contitional formatting on this form or in any subforms.

All subforms are being shown in datasheet format

The Master field for Subforms 2 & 3 is a text box on the main form that is
pulling a value from Subform 1 as follows:
=[frmClassesInSelectedSemesterSubform].[Form]![Class_Name_ID]

I have not entered anything in any event field on the subforms or main
form.

Should have mentioned all of this in the original posting.

Thanks..

Chris



Allen Browne said:
Are any of the forms using conditional formatting? If so, see:
Conditional formatting flaws
at:
http://members.iinet.net.au/~allenbrowne/bug-05.html

If it is not that, what event procedures are in use? Code in Form_Current
could be particularly interesting.

Another possibility: are any calculated fields named in
LinkMasterFields/LinkChildFields?
 
C

Christopher J. Babb

Allen,

Thank you very much... your suggestion was completely productive and worked
great.

Thanks,

Chris

Allen Browne said:
Okay, so subform 2 and subform 3 have a dependency on subform 1. Now we are
looking for anything that could make Access believe that dependency is
cyclic.

If that is unproductive, you could try setting the LinkMasterField for #2
and #3 to:
[frmClassesInSelectedSemesterSubform].[Form]![Class_Name_ID]
instead of the text box, and then in the Current event of subform 1, requery
the other to:
Me.Parent![Sub2].Requery
That's how Microsoft sets it up in Northwind's Customer Orders form.

If that still doesn't work, would it be possible to drop the
LinkMasterFields/LinkChildFields entirely, and set the RecordSource property
of subforms 2 and 3 directly in the Current event of subform 1? That should
circumvent any dependency.

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

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

Christopher J. Babb said:
No contitional formatting on this form or in any subforms.

All subforms are being shown in datasheet format

The Master field for Subforms 2 & 3 is a text box on the main form that is
pulling a value from Subform 1 as follows:
=[frmClassesInSelectedSemesterSubform].[Form]![Class_Name_ID]

I have not entered anything in any event field on the subforms or main
form.

Should have mentioned all of this in the original posting.

Thanks..

Chris



Allen Browne said:
Are any of the forms using conditional formatting? If so, see:
Conditional formatting flaws
at:
http://members.iinet.net.au/~allenbrowne/bug-05.html

If it is not that, what event procedures are in use? Code in Form_Current
could be particularly interesting.

Another possibility: are any calculated fields named in
LinkMasterFields/LinkChildFields?

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

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

Here's my problem...

1 main form with 3 subforms.

The subforms are derived from queries.

Subform 1 is populated by selecting from a combo box on the main
form.
The
value of the combo box is linked to Subform 1 via Master/Child fields.

Selecting a record in Subform 1 populates a text box (Text1) on the
main
form.

Subforms 2 & 3 are linked to the main form using Master/Child fields.
Text1
is used as the Master Field.

All of this works exactly as I wish and displays all of the appropriate
values in all 3 subforms.

The problem I am having is that while the proper data is displayed, the
form
seems to go into an endless loop and displays 'Calculating' at the bottom
of
the main form. The cursor continuosly flickers as does all the data
int
he
subforms. It doesn't lock up the form as when I select a record in Subform
1, it displays the proper values in Subforms 2 & 3.

Can anyone shed any light on this problem?

Thanks,

Chris
 

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