Access Form

G

Guest

Hi

I am having a huge problem trying to get a total of 2 subforms in one main
form.
Example:

My main form is created from a Table and has info on products and in this
form I have brought in a subform as follows:

Product Code Qty Price
1 2 500
2 3 600

I have added a total field to the subform to allow the Qty x price :

Product Code Qty Price Total
1 2 500 1000
2 3 600 1800

I have a second subform with other product info set up the same way as above
Subform 1 is for kitchen details - subform 2 is for wardrobe details.

I would like to have the total of the totals for the first subform and then
add this to the total of the totals for the 2nd subform. At the moment I
have :

Product Code Qty Price Total Grand Total
1 2 500 1000 2800
2 3 600 1800 2800

I just added the Grand total on to both of the subforms =sum[Total]

I noticed that the Grand Total gives me a total on every line - I can live
with this but how can I add the 2 Grand Totals together in my main form??

Please help before I completely lose it and give in!!!

Many thanks and kind regards

Kind regards

Ann Shaw
 
G

Guest

Hi Annie,
I had this issue before and pulled out most of my hair!
My solution was to place a calculated control in the subform's form footer
section to get the subform total and then refer to that control from the main
form. If that was too confusing, check the help files with Access. That is
how I found the answer.

In my situation, I didn't have 2 subforms so I had no need for a subtotal
but you could place textboxes on the main form with a record source of the
calculated subtotal for each form then make all the calculations with another
textbox.
 
G

Guest

Thanks a million Mushroom! Never thought of putting the calculation in the
Footer section. When you say refer to the subform calculated control in the
main form what exactly do you mean can it be picked up relatively easy?

Many thanks
--
Kind regards

Ann Shaw


Mushroom said:
Hi Annie,
I had this issue before and pulled out most of my hair!
My solution was to place a calculated control in the subform's form footer
section to get the subform total and then refer to that control from the main
form. If that was too confusing, check the help files with Access. That is
how I found the answer.

In my situation, I didn't have 2 subforms so I had no need for a subtotal
but you could place textboxes on the main form with a record source of the
calculated subtotal for each form then make all the calculations with another
textbox.


--
Kept in the dark and fed crap all the time.


Annie said:
Hi

I am having a huge problem trying to get a total of 2 subforms in one main
form.
Example:

My main form is created from a Table and has info on products and in this
form I have brought in a subform as follows:

Product Code Qty Price
1 2 500
2 3 600

I have added a total field to the subform to allow the Qty x price :

Product Code Qty Price Total
1 2 500 1000
2 3 600 1800

I have a second subform with other product info set up the same way as above
Subform 1 is for kitchen details - subform 2 is for wardrobe details.

I would like to have the total of the totals for the first subform and then
add this to the total of the totals for the 2nd subform. At the moment I
have :

Product Code Qty Price Total Grand Total
1 2 500 1000 2800
2 3 600 1800 2800

I just added the Grand total on to both of the subforms =sum[Total]

I noticed that the Grand Total gives me a total on every line - I can live
with this but how can I add the 2 Grand Totals together in my main form??

Please help before I completely lose it and give in!!!

Many thanks and kind regards

Kind regards

Ann Shaw
 
G

Guest

Relatively easy is a relative term!

Let me try this again.....
Place a textbox in your main form and then select properties.
Go to the data tab and beside the control souce box, click the build button.
This will bring up the expression builder and you can point and click your
way to the subform's subtotal control.

I am far from an Access Pro so I hope I haven't left out anything critical.
There are other ways to make this reference but they all depend on whether
your form is bound to a table or a query.

At any rate, the Access help files are much more elaborate than I am!
--
Kept in the dark and fed crap all the time.


Annie said:
Thanks a million Mushroom! Never thought of putting the calculation in the
Footer section. When you say refer to the subform calculated control in the
main form what exactly do you mean can it be picked up relatively easy?

Many thanks
--
Kind regards

Ann Shaw


Mushroom said:
Hi Annie,
I had this issue before and pulled out most of my hair!
My solution was to place a calculated control in the subform's form footer
section to get the subform total and then refer to that control from the main
form. If that was too confusing, check the help files with Access. That is
how I found the answer.

In my situation, I didn't have 2 subforms so I had no need for a subtotal
but you could place textboxes on the main form with a record source of the
calculated subtotal for each form then make all the calculations with another
textbox.


--
Kept in the dark and fed crap all the time.


Annie said:
Hi

I am having a huge problem trying to get a total of 2 subforms in one main
form.
Example:

My main form is created from a Table and has info on products and in this
form I have brought in a subform as follows:

Product Code Qty Price
1 2 500
2 3 600

I have added a total field to the subform to allow the Qty x price :

Product Code Qty Price Total
1 2 500 1000
2 3 600 1800

I have a second subform with other product info set up the same way as above
Subform 1 is for kitchen details - subform 2 is for wardrobe details.

I would like to have the total of the totals for the first subform and then
add this to the total of the totals for the 2nd subform. At the moment I
have :

Product Code Qty Price Total Grand Total
1 2 500 1000 2800
2 3 600 1800 2800

I just added the Grand total on to both of the subforms =sum[Total]

I noticed that the Grand Total gives me a total on every line - I can live
with this but how can I add the 2 Grand Totals together in my main form??

Please help before I completely lose it and give in!!!

Many thanks and kind regards

Kind regards

Ann Shaw
 
G

Guest

Thanks again for that - worked a treat!


--
Kind regards

Ann Shaw


Mushroom said:
Relatively easy is a relative term!

Let me try this again.....
Place a textbox in your main form and then select properties.
Go to the data tab and beside the control souce box, click the build button.
This will bring up the expression builder and you can point and click your
way to the subform's subtotal control.

I am far from an Access Pro so I hope I haven't left out anything critical.
There are other ways to make this reference but they all depend on whether
your form is bound to a table or a query.

At any rate, the Access help files are much more elaborate than I am!
--
Kept in the dark and fed crap all the time.


Annie said:
Thanks a million Mushroom! Never thought of putting the calculation in the
Footer section. When you say refer to the subform calculated control in the
main form what exactly do you mean can it be picked up relatively easy?

Many thanks
--
Kind regards

Ann Shaw


Mushroom said:
Hi Annie,
I had this issue before and pulled out most of my hair!
My solution was to place a calculated control in the subform's form footer
section to get the subform total and then refer to that control from the main
form. If that was too confusing, check the help files with Access. That is
how I found the answer.

In my situation, I didn't have 2 subforms so I had no need for a subtotal
but you could place textboxes on the main form with a record source of the
calculated subtotal for each form then make all the calculations with another
textbox.


--
Kept in the dark and fed crap all the time.


:

Hi

I am having a huge problem trying to get a total of 2 subforms in one main
form.
Example:

My main form is created from a Table and has info on products and in this
form I have brought in a subform as follows:

Product Code Qty Price
1 2 500
2 3 600

I have added a total field to the subform to allow the Qty x price :

Product Code Qty Price Total
1 2 500 1000
2 3 600 1800

I have a second subform with other product info set up the same way as above
Subform 1 is for kitchen details - subform 2 is for wardrobe details.

I would like to have the total of the totals for the first subform and then
add this to the total of the totals for the 2nd subform. At the moment I
have :

Product Code Qty Price Total Grand Total
1 2 500 1000 2800
2 3 600 1800 2800

I just added the Grand total on to both of the subforms =sum[Total]

I noticed that the Grand Total gives me a total on every line - I can live
with this but how can I add the 2 Grand Totals together in my main form??

Please help before I completely lose it and give in!!!

Many thanks and kind regards

Kind regards

Ann Shaw
 

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