Conditional statement within a query?

J

Jeff

Can I use a conditional statement within a query field. E.g.:

If RecordDate is > DeadlineDate then
show interest calc in field
else
show different interest calc in field
end if
 
B

Brian

Jeff said:
Can I use a conditional statement within a query field. E.g.:

If RecordDate is > DeadlineDate then
show interest calc in field
else
show different interest calc in field
end if

To do this in a query you will need to use the Iif function. Look it up in
Help.
 
F

fredg

Can I use a conditional statement within a query field. E.g.:

If RecordDate is > DeadlineDate then
show interest calc in field
else
show different interest calc in field
end if

Add a new column to the query grid.

IntCalc:IIf([RecordDate]>[DeadlineDate],interestA,interestB)
 
Top