Reputation: 11791
I'm working up an MS Access report. This report is grouped and has a details section. But some of these details rows don't need to be shown. How do I hide the details sections if, for example, "[fieldx] = 'foo'"?
(In Crystal Reports, there's a place where you can write custom criteria to suppress these kinds of things. I can't find an equivalent functionality here in Access).
Upvotes: 1
Views: 1238
Reputation: 2205
As David suggested, you could pass WHERE condition to the report:
Function OpenReport(filterValue As String)
DoCmd.Close acReport, "ReportName"
DoCmd.OpenReport "ReportName", acViewReport, "", "[SomeFieldName]<>'" & filterValue & "'", acNormal
End Function
Upvotes: 1