Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requery control on main form causes calculation loop 1

Status
Not open for further replies.

TimTDP

Technical User
Feb 15, 2004
373
0
0
ZA
In Access 2000 I have a form with a subform.
On the main form is a control with a DLookup function.
This works well. However if I change a record on the subform I want the control with the Dlookup to update. I put the following code in a field on the subform:
Forms![frmRecipe]![txtRecipeCost].Requery

The subform now goes into a permanent "calculation" mode and is in a loop.

Any ideas why?
 
Sorry, the code is in the After Update event
 
How are ya TimTDP:

You need to [blue]ReCalc[/blue] instead. Try:
Code:
[blue]   Me.Parent.Parent.[blue]ReCalc[/blue][/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Forms![frmRecipe]![txtRecipeCost].Recalc gives me an error 438 - Object doesn't support this property or method
 
TimTDP . . .

You can't [blue]ReCalc[/blue] a control. [blue]ReCalc[/blue]is for [blue]forms/subforms[/blue] only.
Code:
[blue]   Forms!frmRecipe!.Recalc[/blue]


Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top