I have a form that allows my users to generate custom reports.
I build out the report's SQL code dynamically using VBA.
The WHERE clauses all look something like this...
"WHERE tblManufacturer.ID = " & Me.cboManufacturer 'result of user selected combo box
Me.cboManufacturer is a combo box on the user form. The only problem is that I'd like the user to select an "ALL" option that would display a report with data from all manufacturers rather than limiting the result set to just one.
It doesn't look like SQL allows a * wildcard to be used... for example..
WHERE x = *
throws and error.
Is there any wildcard I can use for this case? Or do I have to rework a bunch of my code to allow for that case?