JohnHarkins
MIS
Hi!
I've done the usual bit with a second combo based on the contents of the first. what I'm having particular difficulty with is adding (and referencing) "(all)" to the items in the first in order to let the second box effectively ignore the contents of the first.
I accomplished the "(all)" with the following string:
That works fine.
However, I cannot get the SQL query in the second to select all items in the second combo box to substitute "like '*'" in the criteria to pick up all groups when "(all)" is present in the first combo box.
I hope someone can help... thee hours fiddling around with various types of quotes, etc. is too much effort for so little reward.
Thanks
John Harkins
I've done the usual bit with a second combo based on the contents of the first. what I'm having particular difficulty with is adding (and referencing) "(all)" to the items in the first in order to let the second box effectively ignore the contents of the first.
I accomplished the "(all)" with the following string:
Code:
SELECT DISTINCT tblPersons1.Dept FROM tblPersons1 UNION SELECT "(all)" FROM tblPersons1;
That works fine.
However, I cannot get the SQL query in the second to select all items in the second combo box to substitute "like '*'" in the criteria to pick up all groups when "(all)" is present in the first combo box.
Code:
SELECT DISTINCT tblPersons1.Dept, tblPersons1.Group
FROM tblPersons1
WHERE (((tblPersons1.Dept)=IIf([forms]![frmSelectReports]![cboDept]="(all)","like ""*"" ",[forms]![frmSelectReports]![cboDept])));
I hope someone can help... thee hours fiddling around with various types of quotes, etc. is too much effort for so little reward.
Thanks
John Harkins