If Length is above 2km then perform a query other wise return 0 -

  • Thread starter Thread starter mark909
  • Start date Start date
M

mark909

Hello,

Im trying to build a query that will only perform a calculation if the total
length is above 2km.

Otherwise the query will return a reult of 0.

Im a total newbie to access and so need a little help.

A pointer in the right direction would be greatly appreciated.

Many Thanks
 
You need the IIF function. It would be something like this ...

CalcColumn: IIF([YourLengthField] > 2, [your calc here], 0)

You didn't specify the calc you wanted, so I put in a placeholder, but
you'll have to add your calc in that spot above.
 
Thanks Danny works great!


Danny J. Lesandrini said:
You need the IIF function. It would be something like this ...

CalcColumn: IIF([YourLengthField] > 2, [your calc here], 0)

You didn't specify the calc you wanted, so I put in a placeholder, but
you'll have to add your calc in that spot above.

--
Danny J. Lesandrini
(e-mail address removed)
www.amazecreations.com


mark909 said:
Hello,

Im trying to build a query that will only perform a calculation if the total
length is above 2km.

Otherwise the query will return a reult of 0.

Im a total newbie to access and so need a little help.

A pointer in the right direction would be greatly appreciated.

Many Thanks
 
Back
Top