Customize Report based on User Selections in a Form

  • Thread starter Phil Matish, MCSE
  • Start date
P

Phil Matish, MCSE

I have a single table, for now. There are a lot of Y/N fields.

I want to create another form, which allows the users to select
certain criteria. For example, if a user wants all users that are
members of category 1(check box), and category 3(check box), they
would check both Category 1 and Category 3, and click "Print Report".

Basically, I want to print a report that shows all records that meet
the user defined criteria in the Form. Please Help. I apprecaite it.

Phil
 
C

Chris Sergent

Phil,
This pretty straight forward. Sounds like you have the
form already setup.

I will do a simple example that you could apply, just
replace table, field, query, report, and object names and
you will be okay:


The table we want to base our report on is called whith
the following fields:
tblExample
fldData
fldYesOrNo1
fldYesOrNo2

Add this information to the form:
frmData
with objects named(Note: This is not the name of the
labels):
txtData
chkYesOrNo1
chkYesOrNo2

Create a query; qryData with the fields from tblExample
In the criteria, reference the check box that on the
form. If you need to, use the Expression builder.

The first one as an example would be:
=[Forms]![frmData]![chkYesOrNo1]

Save the query and close it.

Create the report named rptData based on this query.

Go back to the form and add two buttons. The wizard can
simplify the process.

Create one button for Print Preview and One for Printing
the Report. Ensure the form remains opening while running
this report as the query needs to reference the form to
know what information to return. Otherwise you might get
a message of: "Too Few Parameters. Expected 1." It's
Access' way of saying, you haven't told me the specifics.

You could save yourself some work time as well database
size if you integrate the report, form and query.

Chris
sergent7//@earthlink.net

Exclude slashes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top