Problem with calculated fields with data from subform

R

Ragnar Midtskogen

Hi,

We have an application where one of the forms has several calculated fields.
Some of the data comes from subforms, some use data in other calculated
fields.
The subforms are linked to the main form on the invoice number.

This has worked for years, moving from Access 95 through 98 to 2000, but
one client bought new computers running Win XP Home Edition and with Office
XP, and now the calculated fields show up blank..

It appears to be an Access 2003 problem, because it works fine on Access
2000 machines running Win 98, 2000 and XP.
I am wondering if it is a timing problem, since some calculated controls use
the contents of other calculated controls.
I also notice that when I move the main form from one record to the next,
the controls takes a second or two to update.
The new machines are also fast, 2.7 GHz.

Main form, Invoice, based on the Invoice Header table, has several subforms,
one of which is the Invoice Detail subform, based on the Invoice Detail
table.
..
The main form has one calculated control called SubTotal with the
ControlSource as follows:
=Nz([Forms]![Invoice]![Invoice Detail subform].Form!OrderTotal)
where OrderTotal, in the form footer in this subform, is the sum of all
invoice line item amounts.

It has another calculated control called CalSalTax with the following
ControlSource:
=(Nz([SubTotal])*Nz([STRATE]))/100
where SubTotal is the first calculated control.

There is another calculated control called CalTotal with the following
ControlSource:
=[SubTotal]+IIf(IsNull([CalSalTax]),0,[CalSalTax])
which depends on the two previous calcualted controls, SubTotal and
CalSalTax.

There is another calculated control, CalDeposits, which uses data from
another subform, the ControlSource is:
=IIf(Not
IsNull([Child127].Form!tcal_Sum_Payment),[Child127].Form!tcal_Sum_Payment,0)
where tcal_Sum_Payment in the form footer is the sum of all deposits in this
subform

Then there is a calculated control called CalIntPaid Installation paid)
whith the following ControlSource:
=IIf([InstalISpaid]=-1,Nz([INSTALCOST]),0)
where InstalISpaid and INSTALCOST are based controls on the main form.

Finally, there is the calculated control called DueStore with this
ControlSource:
=Nz([caltotal])-Nz([caldeposits])-Nz([CalIntPaid])
where caltotal, caldeposits and CalIntPaid are the calculated controls
above.

I tried calculating the second calculated control directly, but then all
calculated controls show #Error.
I am thinking about trying to calculate all the controls directly, but would
like some opinions.

Any help would be appreciated.

Ragnar
 
G

GVaught

Most likely needs to check references under the code editor window on the
computer running XP.
 
R

Ragnar Midtskogen

Thank you,

Problem was not a references problem, if it had been it would have occurred
on any platform, the references are part of the application.
The solution was to use the Recalc method for the main form. I added that in
a few of the form's event procs.
This appears to be a quirk of 2003, several people have experienced it, an
application works fine on 97, 2000, 2002, but not 2003.

Ragnar
 

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