I am trying to use the where conditions in the DoCmd.OpenReport method in VB. I'm having the user put in values in combo boxes on a form (three combo boxes; Folio, LastName and Planner), and then limiting the records on the report to those that have those values. I am experimenting with one value right now and it's not working.
Here is what I have:
DoCmd.OpenReport stDocName, acPreview, , [FOLIO] = _ [Forms]![frmActivityReport]![FOLIO]
stDocName is the variable name for the report. Folio is the name of a field in the report's underlying query, and the name of a combo box on a form. When it runs this code, it opens the form and displays all the records from the query.
Is there some setting that the report must be set to, like the FilterOn, or something? And will I have any isues when I use more than one parameter in the where condition (when the user puts in a Folio number AND a LastName).
Any help would be appreciated,