continuous forms

N

Nick T

Hi,
I have data from a query which is displayed on a 'continous form'. I need
it like this as it is most user friendly for the intended use.
In the forms header, i have a few cmd buttons, ie to close the form etc.
Users can scrole through the records which is information displayed in text
boxes. One of my text boxes is called 'total' and as it is a continous form,
i want to be able to summarise my 'totals' in the header of my form. So
ideally, i want another text box, which will look at all my 'total' text
boxes, and display eg 'grand total', and another for the 'average'.
ie.
'header text box' = sum of 'totals'
and
'header text box2' = average of 'totals'

Any ideas how i may do this??

Many thanks
 
R

RonaldoOneNil

Set the control source of your header text box to
=DSum("[Totals Field Name]","Your Query Name")

Set the control source of your header text box 2 to
=DFAvg("[Totals Field Name]","Your Query Name")

Substitute the field and query names above with your actual names.
 
N

Nick T

Hi,
Thanks for that,
Can i do this so that i dont need to add a 'query name', Ie, if my 'Totals'
text box on my continous form gets is data by having its control source as
eg. =textbox1+textbox2

Can i simply have a text box in my header which eg control source =
DAvg'Totals'

Hope this makes sence??

Many thanks



RonaldoOneNil said:
Set the control source of your header text box to
=DSum("[Totals Field Name]","Your Query Name")

Set the control source of your header text box 2 to
=DFAvg("[Totals Field Name]","Your Query Name")

Substitute the field and query names above with your actual names.

Nick T said:
Hi,
I have data from a query which is displayed on a 'continous form'. I need
it like this as it is most user friendly for the intended use.
In the forms header, i have a few cmd buttons, ie to close the form etc.
Users can scrole through the records which is information displayed in text
boxes. One of my text boxes is called 'total' and as it is a continous form,
i want to be able to summarise my 'totals' in the header of my form. So
ideally, i want another text box, which will look at all my 'total' text
boxes, and display eg 'grand total', and another for the 'average'.
ie.
'header text box' = sum of 'totals'
and
'header text box2' = average of 'totals'

Any ideas how i may do this??

Many thanks
 
J

John W. Vinson

Hi,
I have data from a query which is displayed on a 'continous form'. I need
it like this as it is most user friendly for the intended use.
In the forms header, i have a few cmd buttons, ie to close the form etc.
Users can scrole through the records which is information displayed in text
boxes. One of my text boxes is called 'total' and as it is a continous form,
i want to be able to summarise my 'totals' in the header of my form. So
ideally, i want another text box, which will look at all my 'total' text
boxes, and display eg 'grand total', and another for the 'average'.
ie.
'header text box' = sum of 'totals'
and
'header text box2' = average of 'totals'

Any ideas how i may do this??

Many thanks

You can't sum *textboxes* on the subform header/footer, but you can sum (or
average, or whatever) *fields* in the subform's recordsource query. So if
there is a field named [Totals] in the query upon which the subform is based,
you can use a control source

=Sum([Totals])

Don't use the same name for the textbox as for the field though, Access will
get confused.
 

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