I have table in Access with budget information I use to generate a report.
One of the fields in my table is called "IsActive". It is defined as a Yes/No field in my table properties.
I would like to open the report and only show the lines where the IsActive field = Yes.
I tried the following:
DoCmd.OpenReport "BudgetTable", acViewReport, "WHERE IsActive = Yes"
and
DoCmd.OpenReport "BudgetTable", acViewReport, "WHERE IsActive = 1"
In both cases the report is showing all the fields, including where the IsActive is set to No.
Your code supplies the
WHEREstring as the FilterName argument of OpenReport ...Supply it as the WhereCondition instead ...
Note the documentation describes the WhereCondition as ...
So make sure to remove
WHEREfrom your WhereCondition string.