add calculating totals

S

Stephen

I have a single table data base for inputing expenses

I have two fields start and stop mileage
I have a query to give mileage driven but how do add this calculation on
a report

All I get is invalid statement same query does pull other values
do I have to have a separate query

thanks
 
G

Guest

Please provide some details. Maybe your query's SQL view, your control
sources, and what you really want to display in your report.
 
S

Stephen

Duane said:
Please provide some details. Maybe your query's SQL view, your control
sources, and what you really want to display in your report.
I have gone back to basics but still get the same error

query does work it lists start and stop mileage the report does give me
a list of values
on the form I create a text box setting its control source as a
calculation stop minus start giving me a run mileage this works
I then want to create an other text box to give a running total and
grand total being the last value

when I run this form I do get the run mileage ok but I get a pop up
"enter parameter value" and other boxes are not shown

thanks
 
G

Guest

You didn't answer: "query's SQL view, your control sources,...". I'm not sure
if this was not clear or you just ignored the request :-(

Assuming you have two numeric fields in your report's record source: [Start]
and [Stop] and you want to display a running sum in the detail section and a
total in a report footer:

Create a text box in the detail section:
Name: txtRunMileage
Control Source: =[Stop]-[Start]
Running Sum: Over All
Add a text box to the Report Footer section:
Name: txtSumMileage
Control Source: =Sum([Stop]-[Start])
 
S

Stephen

Duane said:
You didn't answer: "query's SQL view, your control sources,...". I'm not sure
if this was not clear or you just ignored the request :-(

Assuming you have two numeric fields in your report's record source: [Start]
and [Stop] and you want to display a running sum in the detail section and a
total in a report footer:

Create a text box in the detail section:
Name: txtRunMileage
Control Source: =[Stop]-[Start]
Running Sum: Over All
Add a text box to the Report Footer section:
Name: txtSumMileage
Control Source: =Sum([Stop]-[Start])
ok what do you meen by sql view

start and stop are just number values will look at it again thanks
 
G

Guest

Queries (including record sources of forms and reports) have three possible
views: Design, Datasheet, and SQL. Find the SQL view and copy the statement
and paste it into a reply.

--
Duane Hookom
Microsoft Access MVP


Stephen said:
Duane said:
You didn't answer: "query's SQL view, your control sources,...". I'm not sure
if this was not clear or you just ignored the request :-(

Assuming you have two numeric fields in your report's record source: [Start]
and [Stop] and you want to display a running sum in the detail section and a
total in a report footer:

Create a text box in the detail section:
Name: txtRunMileage
Control Source: =[Stop]-[Start]
Running Sum: Over All
Add a text box to the Report Footer section:
Name: txtSumMileage
Control Source: =Sum([Stop]-[Start])
ok what do you meen by sql view

start and stop are just number values will look at it again thanks
 
S

Stephen

Duane said:
Queries (including record sources of forms and reports) have three possible
views: Design, Datasheet, and SQL. Find the SQL view and copy the statement
and paste it into a reply.
sorry I am behind time using office2000 and do not see a sql view
 
G

Guest

How far did you get? Did you check "record source" in Help? Did you find this
property? Did you click on the [...] button to the right of this property?
 
S

Stephen

Duane said:
How far did you get? Did you check "record source" in Help? Did you find this
property? Did you click on the [...] button to the right of this property?
my calculation is =[home mileage]-[start mileage] from expression builder

I found my error I have text item stuck in my data
 

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