A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Report formulas



 
 
Thread Tools Display Modes
  #1  
Old July 10th, 2009, 11:35 AM posted to microsoft.public.access.gettingstarted
MadCSS
external usenet poster
 
Posts: 9
Default Report formulas

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!
  #2  
Old July 10th, 2009, 01:46 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 2,364
Default Report formulas

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
'================================================= ===


MadCSS wrote:
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!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.