Subform calculated link

el_chileno

New Member
Joined
Feb 24, 2003
Messages
14
I am trying to create a macro to step through all the records in a form to compare a calculated value from a subform in one control source with another value on the main form. The problem is that the macro compares the two values before the calculated value from the subform is updated. Is there any way to force the macro to wait until the value is updated or force the calculation to occur? I have tried requery, refresh, and recalc but none of these seem to work.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Sure. It seems that so long as your Calculation code executes and then you Requery and then your comparison code executes everything should run as needed. I know that this is redundant, but it should work; use the debugger tool to step into your code and make sure the order of your execution is OK.
 
Upvote 0
There is no calculation code. The calculation is a control source linked to the subform. There is a sum field in the subform that returns the total to the main form.
 
Upvote 0

Forum statistics

Threads
1,221,531
Messages
6,160,364
Members
451,642
Latest member
mirofa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top