472,110 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 software developers and data experts.

Four Subform Calculating..Help me..

Hi everyone:

I am new here and I got Calculation problem. thanks in advance..

I have four subforms which retrieve data from different four tables. I created a textbox to do a calculation with the data from four subforms. When I first select a Customer to display on the mainform, the subform's data that related to mainform is correct, but the calculation use Previous Loaded data rather than current data to calculate. And when I select this customer again, the calculation result was right.

Can someone help me....
Sep 20 '07 #1
1 1078
MMcCarthy
14,534 Expert Mod 8TB
Hi everyone:

I am new here and I got Calculation problem. thanks in advance..

I have four subforms which retrieve data from different four tables. I created a textbox to do a calculation with the data from four subforms. When I first select a Customer to display on the mainform, the subform's data that related to mainform is correct, but the calculation use Previous Loaded data rather than current data to calculate. And when I select this customer again, the calculation result was right.

Can someone help me....
Try something like this:

Assuming your calculation textbox is called txtCalc. In the Current event of the form put ...

Me.txtCalc.Requery

See if that solves your problem.
Sep 30 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

14 posts views Thread by Kurt | last post: by
8 posts views Thread by elias.farah | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.