% sum calculation from sub form

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:
 
J

Jonathan Parminter

-----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:


------------------------------------------------
[/url]
~~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
 

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

Similar Threads


Top