>IF NOT EOF('query1') > mysm ='salesmn' = + ALLT(query1.salesmn) + ' And' >ELSE > mysm = '' >ENDIF >>
>IF NOT EOF('query1') > SELE * from INVOICES where salesmn = 'Randy Waldman' And glyear = 11 >ELSE > SELE * from INVOICES where glyear = 11 >ENDIF >Are you sure there are quotes around the name in the expanded query? You're not putting them there. Try:
mysm ='salesmn = [' + ALLT(query1.salesmn) + '] And'Tamar