How to total a sub form

R

Ray C

Ihave a sub form that is based on a query of my Stock Table. I want to
generate a quote and I pick out items from the stock table and display all
the items in a sub form amd wamt to generate a total of all the retail prices
displayed. Can anyone point me in the right direction please?

Thanks Ray C
 
J

Jeanette Cunningham

Ray,
put an unbound textbox on the footer or header of the subform.
Set its control source to
=Sum([ThePriceField])

replace ThePriceField with the name of your price field

Jeanette Cunningham
 
R

Ray C

Hi Jeanette
Thanks fot this but my Sub Form does not have a Header or a Footer, it just
shows as a white square in my main form. Works OK though.
I tried putting your formula into the Footer of the Main Form but that did
not work.
Am I missing a trick here?
Thanks for your help Ray C

Jeanette Cunningham said:
Ray,
put an unbound textbox on the footer or header of the subform.
Set its control source to
=Sum([ThePriceField])

replace ThePriceField with the name of your price field

Jeanette Cunningham

Ray C said:
Ihave a sub form that is based on a query of my Stock Table. I want to
generate a quote and I pick out items from the stock table and display all
the items in a sub form amd wamt to generate a total of all the retail
prices
displayed. Can anyone point me in the right direction please?

Thanks Ray C
 
J

Jeanette Cunningham

Ray,
to create a footer.
--with your subform open in design view
--choose View | Form Header/Footer
--you can reduce the size of the header to nothing by manually dragging the
dividing bar. -----make the footer fairly narrow and put the textbox there.

Jeanette Cunningham

Ray C said:
Hi Jeanette
Thanks fot this but my Sub Form does not have a Header or a Footer, it
just
shows as a white square in my main form. Works OK though.
I tried putting your formula into the Footer of the Main Form but that did
not work.
Am I missing a trick here?
Thanks for your help Ray C

Jeanette Cunningham said:
Ray,
put an unbound textbox on the footer or header of the subform.
Set its control source to
=Sum([ThePriceField])

replace ThePriceField with the name of your price field

Jeanette Cunningham

Ray C said:
Ihave a sub form that is based on a query of my Stock Table. I want to
generate a quote and I pick out items from the stock table and display
all
the items in a sub form amd wamt to generate a total of all the retail
prices
displayed. Can anyone point me in the right direction please?

Thanks Ray C
 
R

Ray C

Hi Jeanette
I really appreciate your help and apologise if I am using the wrong words
here but the space in my Main Form that I call a Sub Form is a white space
that has its Source Object as a Query. When I do as you direct below, I get a
Warning Dialogue that says it will delete all of the Controls if I procede. I
have not proceded as yei. This response does noy sound right, would you want
me to procede and delete all the controls?
Sorry to be a Pain. Thanks Ray C

Jeanette Cunningham said:
Ray,
to create a footer.
--with your subform open in design view
--choose View | Form Header/Footer
--you can reduce the size of the header to nothing by manually dragging the
dividing bar. -----make the footer fairly narrow and put the textbox there.

Jeanette Cunningham

Ray C said:
Hi Jeanette
Thanks fot this but my Sub Form does not have a Header or a Footer, it
just
shows as a white square in my main form. Works OK though.
I tried putting your formula into the Footer of the Main Form but that did
not work.
Am I missing a trick here?
Thanks for your help Ray C

Jeanette Cunningham said:
Ray,
put an unbound textbox on the footer or header of the subform.
Set its control source to
=Sum([ThePriceField])

replace ThePriceField with the name of your price field

Jeanette Cunningham

Ihave a sub form that is based on a query of my Stock Table. I want to
generate a quote and I pick out items from the stock table and display
all
the items in a sub form amd wamt to generate a total of all the retail
prices
displayed. Can anyone point me in the right direction please?

Thanks Ray C
 
J

Jeanette Cunningham

Ray,
when your main form is open, the white space is the subform control that
contains another form - your subform.
When your main form is open in design view, the subform is not there inside
the subform control, which is why you see a white space.
(Assuming your form and subform is set up in the usual way).
Find the name of the form that goes inside the subform control.
Close the main form, go to the database window and open the form that you
found the name of, in design view.
If it has a header or footer, put your textbox there.
Otherwise add a footer.
Add the textbox and its control source, save and close this form.
Now open your main form and find the total in that new text box you added to
the subform.

Jeanette Cunningham


Ray C said:
Hi Jeanette
I really appreciate your help and apologise if I am using the wrong words
here but the space in my Main Form that I call a Sub Form is a white space
that has its Source Object as a Query. When I do as you direct below, I
get a
Warning Dialogue that says it will delete all of the Controls if I
procede. I
have not proceded as yei. This response does noy sound right, would you
want
me to procede and delete all the controls?
Sorry to be a Pain. Thanks Ray C

Jeanette Cunningham said:
Ray,
to create a footer.
--with your subform open in design view
--choose View | Form Header/Footer
--you can reduce the size of the header to nothing by manually dragging
the
dividing bar. -----make the footer fairly narrow and put the textbox
there.

Jeanette Cunningham

Ray C said:
Hi Jeanette
Thanks fot this but my Sub Form does not have a Header or a Footer, it
just
shows as a white square in my main form. Works OK though.
I tried putting your formula into the Footer of the Main Form but that
did
not work.
Am I missing a trick here?
Thanks for your help Ray C

:

Ray,
put an unbound textbox on the footer or header of the subform.
Set its control source to
=Sum([ThePriceField])

replace ThePriceField with the name of your price field

Jeanette Cunningham

Ihave a sub form that is based on a query of my Stock Table. I want
to
generate a quote and I pick out items from the stock table and
display
all
the items in a sub form amd wamt to generate a total of all the
retail
prices
displayed. Can anyone point me in the right direction please?

Thanks Ray C
 
R

Ray C

Jeanette, you'r a treasure! Thanks for the help. Still have a lot of learning
to do in that I had the sub form withits Cntrol Souce set directly to a
Query. It looked great but no Header and Footer (therefore, no total). When I
set the Control Source to a Form whose Control Source is set to a Query, it
works. Looks rubish but it works.
Realy appreciate your help Jeanette
Thanks RayC

Jeanette Cunningham said:
Ray,
when your main form is open, the white space is the subform control that
contains another form - your subform.
When your main form is open in design view, the subform is not there inside
the subform control, which is why you see a white space.
(Assuming your form and subform is set up in the usual way).
Find the name of the form that goes inside the subform control.
Close the main form, go to the database window and open the form that you
found the name of, in design view.
If it has a header or footer, put your textbox there.
Otherwise add a footer.
Add the textbox and its control source, save and close this form.
Now open your main form and find the total in that new text box you added to
the subform.

Jeanette Cunningham


Ray C said:
Hi Jeanette
I really appreciate your help and apologise if I am using the wrong words
here but the space in my Main Form that I call a Sub Form is a white space
that has its Source Object as a Query. When I do as you direct below, I
get a
Warning Dialogue that says it will delete all of the Controls if I
procede. I
have not proceded as yei. This response does noy sound right, would you
want
me to procede and delete all the controls?
Sorry to be a Pain. Thanks Ray C

Jeanette Cunningham said:
Ray,
to create a footer.
--with your subform open in design view
--choose View | Form Header/Footer
--you can reduce the size of the header to nothing by manually dragging
the
dividing bar. -----make the footer fairly narrow and put the textbox
there.

Jeanette Cunningham

Hi Jeanette
Thanks fot this but my Sub Form does not have a Header or a Footer, it
just
shows as a white square in my main form. Works OK though.
I tried putting your formula into the Footer of the Main Form but that
did
not work.
Am I missing a trick here?
Thanks for your help Ray C

:

Ray,
put an unbound textbox on the footer or header of the subform.
Set its control source to
=Sum([ThePriceField])

replace ThePriceField with the name of your price field

Jeanette Cunningham

Ihave a sub form that is based on a query of my Stock Table. I want
to
generate a quote and I pick out items from the stock table and
display
all
the items in a sub form amd wamt to generate a total of all the
retail
prices
displayed. Can anyone point me in the right direction please?

Thanks Ray C
 
J

Jeanette Cunningham

You're very welcome.

Jeanette Cunningham

Ray C said:
Jeanette, you'r a treasure! Thanks for the help. Still have a lot of
learning
to do in that I had the sub form withits Cntrol Souce set directly to a
Query. It looked great but no Header and Footer (therefore, no total).
When I
set the Control Source to a Form whose Control Source is set to a Query,
it
works. Looks rubish but it works.
Realy appreciate your help Jeanette
Thanks RayC

Jeanette Cunningham said:
Ray,
when your main form is open, the white space is the subform control that
contains another form - your subform.
When your main form is open in design view, the subform is not there
inside
the subform control, which is why you see a white space.
(Assuming your form and subform is set up in the usual way).
Find the name of the form that goes inside the subform control.
Close the main form, go to the database window and open the form that you
found the name of, in design view.
If it has a header or footer, put your textbox there.
Otherwise add a footer.
Add the textbox and its control source, save and close this form.
Now open your main form and find the total in that new text box you added
to
the subform.

Jeanette Cunningham


Ray C said:
Hi Jeanette
I really appreciate your help and apologise if I am using the wrong
words
here but the space in my Main Form that I call a Sub Form is a white
space
that has its Source Object as a Query. When I do as you direct below, I
get a
Warning Dialogue that says it will delete all of the Controls if I
procede. I
have not proceded as yei. This response does noy sound right, would you
want
me to procede and delete all the controls?
Sorry to be a Pain. Thanks Ray C

:

Ray,
to create a footer.
--with your subform open in design view
--choose View | Form Header/Footer
--you can reduce the size of the header to nothing by manually
dragging
the
dividing bar. -----make the footer fairly narrow and put the textbox
there.

Jeanette Cunningham

Hi Jeanette
Thanks fot this but my Sub Form does not have a Header or a Footer,
it
just
shows as a white square in my main form. Works OK though.
I tried putting your formula into the Footer of the Main Form but
that
did
not work.
Am I missing a trick here?
Thanks for your help Ray C

:

Ray,
put an unbound textbox on the footer or header of the subform.
Set its control source to
=Sum([ThePriceField])

replace ThePriceField with the name of your price field

Jeanette Cunningham

Ihave a sub form that is based on a query of my Stock Table. I
want
to
generate a quote and I pick out items from the stock table and
display
all
the items in a sub form amd wamt to generate a total of all the
retail
prices
displayed. Can anyone point me in the right direction please?

Thanks Ray C
 

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

Embeded Sub Forms 2
Form with Sub Form Question 2
embeded forms 6
Embeded Forms 11
Calculate total in a form 1
Information in sub form 1
Sub Total a Sub Table 7
How to use 2 separate qrys in 1 form? 1

Top