I have a field whose criteria I can't quite work out.
I have an Option Group on a form. If the value is 2, 3 or 4, then criteria equals as shown below (works fine). The kicker is value 1: I want to return all records (Like "*"). However, using the Switch statement, I can't seem to pass that through. I've tried all sorts of combinations of single and double quotes around the Like "*", but to no avail. I know someone out there knows the quick fix! Thanks.
[code=sql]Switch([Forms]![Accounts]![PaymentTypeOpti onGroupFrame]=1,"Like '*'",[Forms]![Accounts]![PaymentTypeOpti onGroupFrame]=2,"Current Charges",[Forms]![Accounts]![PaymentTypeOpti onGroupFrame]=3,"Fuel Card",[Forms]![Accounts]![PaymentTypeOpti onGroupFrame]=4,"Prepay"[/code]
I have an Option Group on a form. If the value is 2, 3 or 4, then criteria equals as shown below (works fine). The kicker is value 1: I want to return all records (Like "*"). However, using the Switch statement, I can't seem to pass that through. I've tried all sorts of combinations of single and double quotes around the Like "*", but to no avail. I know someone out there knows the quick fix! Thanks.
[code=sql]Switch([Forms]![Accounts]![PaymentTypeOpti onGroupFrame]=1,"Like '*'",[Forms]![Accounts]![PaymentTypeOpti onGroupFrame]=2,"Current Charges",[Forms]![Accounts]![PaymentTypeOpti onGroupFrame]=3,"Fuel Card",[Forms]![Accounts]![PaymentTypeOpti onGroupFrame]=4,"Prepay"[/code]
Comment