Help with Total Invoice Field

S

Stockwell43

Hello,

I need some help please. I have a form that has a subform(I'm not real good
with these). In the subform form I have fields that calculate a total. So I
have Quantity, UnitPrice and then another unbound field that is
txtTotalPrice. Now I have the Control Source of the txtTotalPrice as
=[Quantity]*[UnitPrice] and works just fine.

I now want to add a TotalInvoice field on the main form to show the total of
everything inputted in the subform(for that record of course). However, I
seem to get it to work.

The textbox on the main form is unbound
The name of the main form is: frmSLFproductinformation
The name of the subform is: frmDetails

Can anyone please help me figure this out? Also, As I am a bit challanged
with subforms, please simplify answer.

Thanks!!!
 
B

Beetle

Put an unbound text box (i.e. txtSubTotal) in the footer of your
subform with a control source of: =Sum([Quantity]*[UnitPrice]).
Make it hidden if you want.

Now put an unbound text box on your main form with a control
source of: =[frmDetails].[Form]![txtSubTotal]
 
K

Klatuu

For 2003 and earlier, the Northwind sample database has an excellent
demonstration of this in the Orders and Orders Subform forms.

Basically, you put a control in the footer of the subform form that sums
the values. It is like a report. The Control Source would be like

=Sum([Quantity]*[UnitPrice])

Then to show the value on the main form (the subform footer will not show in
datasheet view), put a control that just displays the value of the control
that does the sum.
 
S

Stockwell43

Hi Beetle!!

Thank you, works like a charm!!!!!
Many Thanks and have a great weekend!!!!!!


Beetle said:
Put an unbound text box (i.e. txtSubTotal) in the footer of your
subform with a control source of: =Sum([Quantity]*[UnitPrice]).
Make it hidden if you want.

Now put an unbound text box on your main form with a control
source of: =[frmDetails].[Form]![txtSubTotal]
--
_________

Sean Bailey


Stockwell43 said:
Hello,

I need some help please. I have a form that has a subform(I'm not real good
with these). In the subform form I have fields that calculate a total. So I
have Quantity, UnitPrice and then another unbound field that is
txtTotalPrice. Now I have the Control Source of the txtTotalPrice as
=[Quantity]*[UnitPrice] and works just fine.

I now want to add a TotalInvoice field on the main form to show the total of
everything inputted in the subform(for that record of course). However, I
seem to get it to work.

The textbox on the main form is unbound
The name of the main form is: frmSLFproductinformation
The name of the subform is: frmDetails

Can anyone please help me figure this out? Also, As I am a bit challanged
with subforms, please simplify answer.

Thanks!!!
 
S

Stockwell43

Hi Klatuu!

How have you been??

Thank you for your response. I did get a similar response from Beetle so you
guys must have been back to back.

Hope all is well, have a great weekend!!!

Klatuu said:
For 2003 and earlier, the Northwind sample database has an excellent
demonstration of this in the Orders and Orders Subform forms.

Basically, you put a control in the footer of the subform form that sums
the values. It is like a report. The Control Source would be like

=Sum([Quantity]*[UnitPrice])

Then to show the value on the main form (the subform footer will not show in
datasheet view), put a control that just displays the value of the control
that does the sum.

Stockwell43 said:
Hello,

I need some help please. I have a form that has a subform(I'm not real
good
with these). In the subform form I have fields that calculate a total. So
I
have Quantity, UnitPrice and then another unbound field that is
txtTotalPrice. Now I have the Control Source of the txtTotalPrice as
=[Quantity]*[UnitPrice] and works just fine.

I now want to add a TotalInvoice field on the main form to show the total
of
everything inputted in the subform(for that record of course). However, I
seem to get it to work.

The textbox on the main form is unbound
The name of the main form is: frmSLFproductinformation
The name of the subform is: frmDetails

Can anyone please help me figure this out? Also, As I am a bit challanged
with subforms, please simplify answer.

Thanks!!!
 

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