Tom, Take a look at the SWITCH/ENDSW syntax and see if that could help you.
Regards, Alastair. From: TOM HART Sent: Saturday, April 16, 2011 1:14 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Multi column lookup I currently use a form to look-up information from a table where field1 contains var1 and field2 contains var2, and if var1 is null then only use field2 contains var2: IF var1 IS NULL THEN browse using tablename order by colunm1, column2+ where column2 contains .var2 ELSE browse using tablename order by column1, column2+ where column1 contains .var1 and column2 contains .var2 ENDIF This works fine, but now I want to have 4 variables. Is there a better way to do this if say I want to leave 2 variables blank. Tom Hart

