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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|