rounding negitive numbers up to 0

@stan

Registered User.
Local time
Yesterday, 18:45
Joined
Feb 26, 2013
Messages
29
I can not have any negitive numbers show up in my field so I need to round up and negitives to "0"
 
You could use an IIF, something like,
Code:
NewField : IIF([OldFieldName] < 0, 0, [OldFieldName])
 
Ok, tried, when running it thinks that the [fieldname] is a parameter and askes me to enter parameter value....
 
Could you post your actual SQL Query please?
 
This happens when you use an incorrect fieldname, you did spell your fieldname correctly?

Brian
 
the field name is an alias, I created in the query to create a number from two different dates.
 
the first is, the [selected date ] from a form -[entry date of object field]
most come out + but for those who's [entry date] starts later in the month in question thiers comes out as a -
 
Brain thank you for asking about the field name, Iv done that a fee times here in the middle of the night
 
IIF works as long as I dont try to do it from within the same query
thank you all for your help
 
It's been a while but I don't think that you can use the alias in the Iif , I think you need to go back to the original calculation

Eg c: a+b

Cannot say iif(c=

Have to say iif(a+b

Brian

Edit as you have noticed you can use the alias in a later query.
 

Users who are viewing this thread

Back
Top Bottom