Sum in Text box on Subform or main form (subform is a Continuous form)

D

datahead22

Hello All, I will try to describe this as clearly as possible bear
with me it's been about a year since I was doing this level of coding
on an MS Access form.

Here is what I've got:

I have a form called "Sales Order"
in the "Sales Order" form I have a subform called "RSA_Order_subfrm2"
the subform uses a query "RSA_Order_qry" for it's record source.

In the query "RSA_Order_qry" I have a field called "Aws_list_Price3"
this field is formatted as such
Aws_list_Price3: Format(nz([Aws_list_Price2],0),"Currency")

The field [Aws_list_Price2] that is referred to in the above statement
is in the same query and is formatted as such
Aws_list_Price2: IIf([Select]=0,"0.00",[AWS_List_Price]*[QTY])

The field [Select] is a Y/N field that I use as a check box on the
RSA_Order_subfrm2 it is Check34.

This all works fine.

Here is what I am trying to do:
Either on the subform footer of RSA_Order_subfrm2 (which is a
Continuous form)
or somewhere on the main form I would like to sum the values of the
[Aws_list_Price3] text box.

What is currently happening with or without the various bits of coding
I have tried is the following:

I have created an unbound text box in the subform footer called Text54
I have put the following statement in the control source:
=Sum([Aws_list_Price3])

if I check the Check34 for Product A Text54 remains Zero

if I also check the Check34 for Product B so that both Products A and
B are selected Text54 shows the value for Product A

if I add yet another check for Product C, selecting Products A,B and C
Text54 now shows the sum of Products A and B but not C.

If any one can help or if I did not explain this very well please let
me know.

P.S. an extra credit question after I get Text54 to sum correctly how
do I get it to show up as currency.

As always thank you in advance.
 

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