ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with Filter and FilterOn (https://www.excelbanter.com/excel-programming/417631-help-filter-filteron.html)

EAB1977

Help with Filter and FilterOn
 
Can anyone tell me why my filter doesn't work when I click the button
to run a report?

Private Sub btnCost_Click()
DoCmd.OpenReport "rptCost", acViewPreview
Reports("rptCost").Filter = Me.lstResults.Column(0)
Reports("rptCost").FilterOn = True
End Sub

The filter does not seem to be set when the report runs.

Dave Peterson

Help with Filter and FilterOn
 
Did you mean to post this to an Access group?

EAB1977 wrote:

Can anyone tell me why my filter doesn't work when I click the button
to run a report?

Private Sub btnCost_Click()
DoCmd.OpenReport "rptCost", acViewPreview
Reports("rptCost").Filter = Me.lstResults.Column(0)
Reports("rptCost").FilterOn = True
End Sub

The filter does not seem to be set when the report runs.


--

Dave Peterson

EAB1977

Help with Filter and FilterOn
 
Opps. I did. Sorry.



All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com