PDA

View Full Version : Expressions on a form is displaying incorrect calculations with negative values



wedd
01-13-2012, 09:07 AM
Hi experts,

I have a formula created in an expression in a textbox on a form in access 2010: start time subtract end time multiplied by a cost price, but the total keeps displaying in a negative value i.e -$12...which is incorrect is there a way to rectify this possibly in properties or else where... I'm not sure so it displays the correct value?


Thanks for your contributions:friends:

jrajul
01-14-2012, 05:14 PM
use the datediff function.

datediff("n",startDate+startTime, endDate+EndTime).

wedd
01-16-2012, 04:21 AM
Thanks, jrajul! I would like to calculate the the amount of hours a customer uses a facility and have an option to add a discount to the amount of hours to give a total price. Would you know of a formula how to do this? Thanks