1) <B>SET ANSI OFF</B> SELECT a.company, a.conname, a.ab_id; from AddressBook a; inner join CatLink on a.ab_id == CatLink.ab_id; where NOT obsolete; and (CatLink.Catagory <B>=</B> lcCatToShow); ORDER by &lcDisplayOrder; into cursor DisplayNames 2) if thisform.cToShow = "All" lcCatToShow = "" else lcCatToShow = " AND (CatLink.Catagory == thisform.cToShow)" endif SELECT a.company, a.conname, a.ab_id; from AddressBook a; inner join CatLink on a.ab_id == CatLink.ab_id; where NOT obsolete; &lcCatToShow; ORDER by &lcDisplayOrder; into cursor DisplayNamesHTH
if thisform.cToShow = "All" > lcCatToShow = "" &&>>> This is where I want a wildcard > else > lcCatToShow = thisform.cToShow && Or a specific one >endif > >SELECT a.company, a.conname, a.ab_id ; > from AddressBook a; > inner join CatLink on a.ab_id == CatLink.ab_id ; > where obsolete = .f. ; > and CatLink.Catagory == lcCatToShow ; > ORDER by &lcDisplayOrder ; > into cursor DisplayNames>I tried the "" and got nothing.