A family of Microsoft relational database management systems designed for ease of use.
Thank you for replying. I am very novice at writing code, and in fact what I have has is pieced together by using search engine results. And am not even certain I have all of the coding I need in there.
My intention was there would always be a region entered and at least one type of service the user would be looking for.
I took your suggestion, made the modification and it is still giving me the same error.
Is it possible that it is not how the code is written at this point, but how I have the query set up to generate the report? I've never used a listbox on a form before... Under a query criteria line, I used the same format that I would use for a combo box.
[Forms]![Multiple Categories By Region]![LstCategory]
Is the error really exactly the same? What does it show for the query expression where the error occurs?
Do you get the exact same error when you open the report directly from the navigation pane (so long as you have the form open when you open it)? If so, then there's an error in the recordsource query of the report. If not, then the syntax error is in the filter string your code is building. Please post that code as it stands now. Also, insert the line:
Debug.Print strFilter
... right before the DoCmd.OpenReport line, and see what is displayed in the Immediate Window when you click the button to open the report. If it isn't obvious where the trouble is, post that output here for us to look at.
I notice you said your recordsource query has a criterion "[Forms]![Multiple Categories By Region]![LstCategory]". Isn't that the same as what you are using to build your filter criteria in code? If so, then you don't need that criterion in the query. Further, if the list box is a multiselect list box as your code implies, then you can't use it as a criterion in the query like that, because its value will always be Null. Only single-select list boxes have a value.