Criteria

A

Amateur

Is it possible to manipulate the field-output with a criteria.
For example if in the field is a positive number than the field should show 0.
something like "If>0=0"
If that is possible please tell me how to do that correct.
Thanks
Klaus
 
A

Allen Browne

Type the expression into a fresh column in the Field row in query design.

Example:
AdjustedField1: IIf([Field1] > 0, 0, [Field1])

IIf() is the immediate If.
Substitute your field name for Field1.
The name before the colon can be any alias you want, but should be different
from the field name to avoid ambiguity.
 
W

Wayne-I-M

Hi

Create a new calculated column and insert this

Answer:IIf ( [TableName]![FieldName]>0 , 0, [TableName]![FieldName])

This will insert the value 0 "if" the value of [TableName]![FieldName] is
greater than 0 - if it isn't it will insert the value [TableName]![FieldName]

Change TableName and FieldName to what they are in your database query.

Just a point if you give table and field names in any questions (or the full
sql) you will tend to get better answers.
 
Top