Report with Where Clause

johntology

Registered User.
Local time
Today, 04:07
Joined
Apr 20, 2011
Messages
16
Hello,

I've looked around in vain for something that should be simple. I have a report in Access and I just want to add a where clause to it! How do you do this? When I put the report in Design view, there's no obvious place to apply or manually type in a filter. None of the searches I've done online directly address this. Am I missing something obvious?
Thanks.
 
1. It is in the record source - so you would build a query and put the where clause there.

OR

2. Just apply it when opening the report:

Code:
Dim strWhere As String
 
strWhere = "[FieldnameHere] = " & Chr(34) & Me.ComboBoxName & Chr(34)
 
DoCmd.OpenReport "ReportName", acViewPreview, , strWhere

And it can be more complex than that but that's the general implementation of it.
 

Users who are viewing this thread

Back
Top Bottom