Criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top