Operators (>=, =, etc) cannot be dynamic in query object. Have to use a static operator and then IIf() determines what parameter to return.
Consider:
WHERE fieldname LIKE IIf(combobox = "All", "*", combobox)
If your requirements are really more complicated than indicated, advise not to use dynamic query object. Use VBA to conditionally build filter criteria and apply to form or report. Or use VBA to manipulate QueryDefs to modify query object.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…