Home  Fees/Services  Access Templates  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links

Access Query Examples
MS Access SQL Support & Training
Access Report Filter Form Tutorial

SQL Access Report Filters Queries Microsoft Access 2007 Query Help
Professional Microsoft Access Programmers

Access Template Databases:


MS Query Tutorials:

Aggregate Functions
Choose Function
More Choose Functions
Crosstab Query Tutorial
Crosstab Query Advanced
DateTime Query
Delete Query Tutorial
External Link Query
Access Report Filter Query
Group By Clause
Access Having Clause
Histogram Query Tutorial
Insert Into Query
Master/Detail Updates
Order By Dynamic
Access Parameter Query
Predicate Query Example
Self Join Query Tutorial
Scalar Query Example
Child/Parent Table Query
Select Statement Tutorial
Select Top 1 Query
Union Query Example
Access Update Query

Multi-Select Parameter Forms Query Tutorial


Access Report Filter Tutorial

Form Fields as Report Filters

In this Access Report Filter records are filtered via a parameter form field. In the filtering example we use the Employee_ID selected in filter report example to select employee records for a report.

Many users and developers would use filters on the report to accomplish this task.

Filters are ok to use but putting these restrictions in the SQL query for the report usually runs faster.  This example assumes that you have a combo box (named: Emp_Combo), as defined in a previous example, in a form called F_Emp.

Filter Report Records Using Form Field Parameter Example:

Select M_Employees.Name, M_Employees.Emp_Number, M_Employees.Address
From M_Employees
Where
Forms!F_Emp!Emp_Combo=0 or Forms!F_Emp!Emp_Combo = M_Employees.Employee_ID;

This SQL query will select a specific employee or All employees for the report filter based on the Emp_Combo in the parameter form (F_Emp).  Note: You could have several combo boxes on the parameter form which would allow the user to filter report records based on a combination of several fields.   This Access report filter method provides a very powerful reporting feature.  (Warning:  Access may attempt to re-write your 'where' clause making it non-functioning).

Warning: If you ever want to upsize this Microsoft Access database to SQL Server then you should not refer to form fields within the query.  SQL Server can't deal with these references. 

More MS Access Report Filter Query Examples:

Parameter Query  as Reports Filter

Attendance_Date >= Forms!F_Emp_Report!Start_Date Group By Employee_ID ... Note: If you get an Microsoft Access error saying that the form or field Forms! ...


Contact Information

Microsoft Access Developer

Microsoft Access Query 2007 2003 2000 Access Query Tutorial