% sum calculation from sub form

  • Thread starter Thread starter Josh C Y
  • Start date Start date
J

Josh C Y

Hi there,

I am constructing recipe db using MA Access. I use s sub form
(datasheet default view) to display the ingredient list and percentage,
cost, etc. within a master form.

In the sub form, a cost textbox holds "TxtCosteachLB " that calculates
values from other fields to convert ingredient cost to cost per LB
bases. I use the "IIf(....)" statement in the control source of that
textbox to do the job.

However, the textbox in the master form that sum the ingredient cost
gives me an error. The Access keeps changing the content inside the
Sum()statement in the control source of the textbox to something else
and won't calculate what I wanted.

Can someone tell me what can be the cause and the solutions?

Thanks,

Josh:confused:
 
-----Original Message-----

Hi there,

I am constructing recipe db using MA Access. I use s sub form
(datasheet default view) to display the ingredient list and percentage,
cost, etc. within a master form.

In the sub form, a cost textbox holds "TxtCosteachLB " that calculates
values from other fields to convert ingredient cost to cost per LB
bases. I use the "IIf(....)" statement in the control source of that
textbox to do the job.

However, the textbox in the master form that sum the ingredient cost
gives me an error. The Access keeps changing the content inside the
Sum()statement in the control source of the textbox to something else
and won't calculate what I wanted.

Can someone tell me what can be the cause and the solutions?

Thanks,

Josh:confused:


------------------------------------------------

~~View and post usenet messages directly from http://www.ExcelForum.com/

.
Hi Josh, you could try doing the total cost calculation in
the subform, perhaps in the form footer.

If required on the main form, the footer can be set to
visible = false and then use a textbox on the main form
that has the subform total textbox as its control source.

Luck
Jonathan
 
Back
Top