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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculated Field not Updating

Status
Not open for further replies.

JJman

Technical User
May 8, 2003
89
IN

I have a continuous subform with a calculated field that does not update itself when values in fields it sums are entered/changed. For example, I have field called Comp_qty and the calculated field is =Sum([comp_qty]). The calc field will reflect any changes made only after exiting the main form and reentering it, but will not update immediately when information is entered/modified.

Any help is appreciated!
 
Once data is changed, you will need to run the code <ControlName>.Requery. That is just in the design of the form that it does not refresh by itself. You can put that line in the afterupdate of the control that stores the comp_qty value.
 
I am now requerying the control, but instead of displaying the new value, it's giving me a message related to a filter I have on the main form. The message says &quot;You can't use the ApplyFilter action on this window&quot; with additional information listed underneath. Any thoughts how to get around this? I don't understand what the filter has to do with requerying a simple calculation. Thanks again for your help.
 
Is your AllowFilters property in the form set to Yes? If so it should work. Look at the filter line of the form in design mode and make sure that there is nothing there.
 

The Allow Filters property is set to Yes, and I do have a filter on the filter line, but I need it. I must be missing something, but I don't know what it could be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top