Full Version: Calculated Field Problem
UtterAccess Discussion Forums > Microsoft® Access > Access Tables + Relationships
emcp422
i have a table with this fields


FIELD TYPE (description)
sale currency (sometimes could be 0)
cash currency (sometimes could be 0)
Creditcard currency
adminfees currency
downpayment currency



and i want to add a calculated field called pending which would be adminfees+downpayment-cash-creditcard but when i try to write the formula i wrote it like this

iif(adminfees+downpayment-cash-creditcard<=0,0,adminfees+downpayment-cash-creditcard)


i get the error the field could not be saved because its result is null or binary its not supported by the server

i would greatly appreciate if anyone could help
theDBguy
Hi,

welcome2UA.gif

I am guessing you are using Access 2010. Although I have not tried creating a calculated field before, I suspect that you could try removing the IIf statement and perhaps just play with the Format property to see if you can force negative numbers to display as a 0.

Just my 2 cents...
emcp422
i have no idea on hot to do what you requested
theDBguy
Hi,

I was wondering if you could just use the expression:

[adminfees]+[downpayment]-[cash]-[creditcard]

And then this in the Format property:

;0

Just a thought...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.