report filter search

accesshelpme

Registered User.
Local time
Today, 15:43
Joined
May 13, 2012
Messages
15
I have a report that shows 3 columns, clients, versions, products and vendors. How can i make it so a user can filter the report to show only certain info. forexample, only show the clients that have a certain product. or only show clients with certain versions. Any suggestions? I want to user to specifiy the contrants for the report.
 
You could create a Search Form.

Three fields

Clients
Versions
Products

Button

Then a Function:

Code:
Function ClientSearchCriteria()
    With CodeContentOject
        ClientSearchCritieria = "[Client] like '" & .[Client] & "*" & "' and [Product] like '" .[Product] & "*" & "' and [Version] like '" .[Version] & "*" & "'"
    End With
End Function
On the Button > OnClick
Code:
Function ClientsSearch_Report()
    With CodeContextObject
            DoCmd.OpenReport "ClientsReport", acViewPreview, "",ClientsSearchCriteria, acWindowNormal
    End With
End Function
Simon
 

Users who are viewing this thread

Back
Top Bottom