Total up a field

L

LMB

Hi Guys,

I am using Access 97 and I have a report based on a query "qryInformation". One of the controls is a "value" field from my query. It's the value of an item in dollars ($150). I want a control on my report that will give a sum of all of my values. I created a query based on the original query which gives me this figure "qryTotalValue" but since the report's record source is qryInformation, I don't have this value to pick from when I select from the control source property. How do you enter a control source from a different record source?



Thanks,
Linda
 
P

PC Datasheet

Hi Linda,

Add a hidden textbox named TotalValue next to your value field. Set the
control source for TotalValue to =[Name Of Value Field]. With TotalValue
selected, find the running sum property and set it to Yes. Select the field
where you want the total value and set its control source to =[TotalValue].
You don't need qryTotalValue!

(BTW, it's nice to see you using the naming convention of starting query
names with qry!)

Hope things are going well for you!

Steve
PC Datasheet


Hi Guys,

I am using Access 97 and I have a report based on a query "qryInformation".
One of the controls is a "value" field from my query. It's the value of an
item in dollars ($150). I want a control on my report that will give a sum
of all of my values. I created a query based on the original query which
gives me this figure "qryTotalValue" but since the report's record source is
qryInformation, I don't have this value to pick from when I select from the
control source property. How do you enter a control source from a different
record source?



Thanks,
Linda
 
D

Duane Hookom

If you want the sum to appear in the report (or a group) footer, add a text box with a control source of:
=Sum([YourValueField])

--
Duane Hookom
MS Access MVP


Hi Guys,

I am using Access 97 and I have a report based on a query "qryInformation". One of the controls is a "value" field from my query. It's the value of an item in dollars ($150). I want a control on my report that will give a sum of all of my values. I created a query based on the original query which gives me this figure "qryTotalValue" but since the report's record source is qryInformation, I don't have this value to pick from when I select from the control source property. How do you enter a control source from a different record source?



Thanks,
Linda
 
L

LMB

You gotta be kidding me. Brackets mean what? Parentheses mean what? I looked for the =Sum in the function builder and I didn't see that. Is Sum a Function?

Thanks!

Linda
If you want the sum to appear in the report (or a group) footer, add a text box with a control source of:
=Sum([YourValueField])

--
Duane Hookom
MS Access MVP


Hi Guys,

I am using Access 97 and I have a report based on a query "qryInformation". One of the controls is a "value" field from my query. It's the value of an item in dollars ($150). I want a control on my report that will give a sum of all of my values. I created a query based on the original query which gives me this figure "qryTotalValue" but since the report's record source is qryInformation, I don't have this value to pick from when I select from the control source property. How do you enter a control source from a different record source?



Thanks,
Linda
 
L

LMB

Thank you Steve. I haven't been able to get this yet but I'll keep trying. In the mean time Duane's plan worked.

BTW as far as using the qry, I believe I have been using naming conventions since I started with Access...That's the only thing I caught on to quickly.

Linda
Hi Linda,

Add a hidden textbox named TotalValue next to your value field. Set the
control source for TotalValue to =[Name Of Value Field]. With TotalValue
selected, find the running sum property and set it to Yes. Select the field
where you want the total value and set its control source to =[TotalValue].
You don't need qryTotalValue!

(BTW, it's nice to see you using the naming convention of starting query
names with qry!)

Hope things are going well for you!

Steve
PC Datasheet


Hi Guys,

I am using Access 97 and I have a report based on a query "qryInformation".
One of the controls is a "value" field from my query. It's the value of an
item in dollars ($150). I want a control on my report that will give a sum
of all of my values. I created a query based on the original query which
gives me this figure "qryTotalValue" but since the report's record source is
qryInformation, I don't have this value to pick from when I select from the
control source property. How do you enter a control source from a different
record source?



Thanks,
Linda
 
D

Duane Hookom

Square brackets are used to wrap around object (field for instance) name
that might contain spaces. Sum() can be used in Report sections to sum
values.

--
Duane Hookom
MS Access MVP


You gotta be kidding me. Brackets mean what? Parentheses mean what? I
looked for the =Sum in the function builder and I didn't see that. Is Sum a
Function?

Thanks!

Linda
If you want the sum to appear in the report (or a group) footer, add a text
box with a control source of:
=Sum([YourValueField])

--
Duane Hookom
MS Access MVP


Hi Guys,

I am using Access 97 and I have a report based on a query "qryInformation".
One of the controls is a "value" field from my query. It's the value of an
item in dollars ($150). I want a control on my report that will give a sum
of all of my values. I created a query based on the original query which
gives me this figure "qryTotalValue" but since the report's record source is
qryInformation, I don't have this value to pick from when I select from the
control source property. How do you enter a control source from a different
record source?



Thanks,
Linda
 

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