Unbound form named: frmABC
Combo box named: cboGroupNum
Row Source Type is Value List
Row Source is: “Toys123”;”Food123”; “Homes123”; “Clothes123”
Command button: cmdOpenReport
(When user clicks the button, the report opens based on
criteria fed to query by form's combobox.)
query named qryABC
The query is based on a table:
query field = GroupNumber
criteria for GroupNumber field is: [Forms]![frmABC]![cboGroupNum]
When the user selects Toys123,Food123 or Homes123, the report works fine.
What I am having a problem with, is grouping 3 of the groups as one.
When the user selects Clothes123, I need the criteria in the query’s GroupNumber field to represent: In (Shoes123,Hats123,Gloves123)
The boss insists on a combobox (which eliminates the possibilty of a multi select listbox).
Is there a proper syntax to code what I am trying to do?
Something to the effect (pseudocode):
If [Forms]![frmABC]![cboGroupNum] =
Clothes123 then GroupNumber criteria = In (Shoes123,Hats123,Gloves123) Else GroupNumber criteria = [Forms]![frmABC]![cboGroupNum]