View Full Version : Switch


deejay_totoro
01-05-2004, 03:38 AM
Hello,

I am using "Switch" to return a value based on a number stored in my database. The query line looks something like this:

ResponseField: Switch([Q1]="1","No value at all",[Q1]="2","Little value",[LinManQ3]="3","Good value")

What I would like to do is: if none of the values are found, return another statement ("such as no box ticked").

Many thanks!

dj_T

Mile-O
01-05-2004, 04:19 AM
Maybe this?

ResponseField: IIf(IsNull([Q1]),"No box is ticked", Switch([Q1]="1","No value at all",[Q1]="2","Little value",[LinManQ3]="3","Good value"))

deejay_totoro
01-05-2004, 05:23 AM
Ah thanks!

That does the job perfectly.

dj_T