Using a Form to Filter a Report

  • Thread starter Thread starter Chip
  • Start date Start date
C

Chip

Hello, I am relatively now to ACCESS so please be gentle with the VB...

I am wanting to have a Form that has 2 combo boxes that i want the user to
select a record for each one then the person hit a Print button and the
Report be filters by the 2 selections from the form.

Basically what i have is a single table that has information about students
in college and i want to build an easy user interface so that if they want a
list of the Seniors that are Majoring in Pre-med. Then the user will select
Senior from the "Class" Combo box and then select Pre-Med from the "Major"
Combo box. then the report that is printed will only show the Students that
are a Senior and Majoring in Pre-Med.

There may be a better way if there please let me know. AS ALWAYS, THANKS IN
ADVANCE!!!!
-Chip-
 
Add to the report's record source query two criteria for the appropriate
fields, and have those criteria read their values from the form. Expressions
would be something like this:
Forms!FormName!ControlName

The command button would just need to open the report in normal mode (which
means "print the report"), and the report's query will get the values from
the form. Be sure to keep the form open while the report prints.
 
Back
Top