Help please.
I have a report that is based on a query which selects all the records in the table. Sometimes, though, the user will want to select certain records from a listbox and then see the report.
I have tried setting the report filter property to a public variable - strvar - which contains the highlighted choices from the list box.
When I open the report, I use:
DoCmd.OpenReport "rptShortReport", PrintMode,, strvar
I've even tried changing strvar to be in the format of fieldname = 'xxx', fieldname = 'yyy', etc.
No luck!
I have a report that is based on a query which selects all the records in the table. Sometimes, though, the user will want to select certain records from a listbox and then see the report.
I have tried setting the report filter property to a public variable - strvar - which contains the highlighted choices from the list box.
When I open the report, I use:
DoCmd.OpenReport "rptShortReport", PrintMode,, strvar
I've even tried changing strvar to be in the format of fieldname = 'xxx', fieldname = 'yyy', etc.
No luck!