condition in query

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

Guest

Hi

Is there an anyway I can put below "if" condition in query to produce the output(f3).
f1& f2 is the field from table & f3 is temporary calculated field in query

if f1 = 0 then f3=
else
f3 = f2 - f
 
create your new expresson like this:

f3:iif(f1=0,0,f2-f1)
-----Original Message-----
Hi!

Is there an anyway I can put below "if" condition in
query to produce the output(f3).
 
If you were in design view, you could put the following in
an empty field cell

f3:IIf(f1=0,0,f2-f1)

If you were in SQL view, you would put

SELECT IIf(f1=0,0,f2-f1) As f3

Hope This Helps
Gerald Stanley MCSD
 
Back
Top