Report formulas

M

MadCSS

I have a report in which I would like to calculate the total gas used each
day by each vehicle in my database. I created an unbound textbox and added
this formula to the control:

=[gasatend]-[gasatstart]

This works as expected, but the problem is that when I try to add a total
using the icon on the toolbar (like a running total) the ¨Sum¨ function is no
longer an option. The only option available is ¨Sount Records¨. I tried
changing the formats to General Number, but it didn´t help. Any suggestions?

Also, the field for Gas Expenditure is an unbound text box with the formula:

=[totalgas]*[gasprice]

But for some reason this field is always blank. I am thinking that it might
be because the formula itself is based on Total Gas, which is unbound, but
there must be some way to make that work!

PLEASE HELP! Thanks! :)
 
J

John Spencer

For Gas Expenditure you need to use

=([gasatend]-[gasatstart]) * GasPrice

For the sum you probably will have to add the control yourself and set
its control source to

=Sum([gasatend]-[gasatstart])

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

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