SQL If Statments in Access

  • Thread starter Thread starter Jacques
  • Start date Start date
J

Jacques

I have an Access table that I need to get data from three
different fields depending on another field being
populated. Does Access have SQL code similar to If
statments or decode statments?
 
Jacques said:
I have an Access table that I need to get data from three
different fields depending on another field being
populated. Does Access have SQL code similar to If
statments or decode statments?

Immediate-If
IIf(SomeTest, ReturnIfTrue, ReturnIfFalse)

or the Switch() Function.
Switch(FirstTest, ReturnIfTrue, SecondTest, ReturnIfTrue, etc..)
 
Check Access VB Help on the IIf (Immediate If) function.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top