IF "'" $ LEFT(This.Text,This.SelStart) cWhere = IIF(This.lContainedIn, 'UPPER("' + LEFT(This.Text,This.SelStart) + '") $ UPPER(' + cField + ')', 'UPPER(' + cField + ') = UPPER("' + LEFT(This.Text,This.SelStart + '")')) ELSE ** Error Message appears here cWhere = IIF(This.lContainedIn, "UPPER('" + LEFT(This.Text,This.SelStart) + "') $ UPPER(" + cField + ")", "UPPER(" + cField + ") = UPPER('" + LEFT(This.Text,This.SelStart + "')")) ENDIFThanks for any input