Filtering a report

C

Chris

Hello group. I'm really stuck and don't know what I'm doing here so any
advice would be appreciated.

Every client has alot of companies that they owe money to.
I have a report that is based on a query.

I would like the user to select a client, click the print button and the
report will produce a list of the compainies they owe money to.

Help.
 
R

Rick Brandt

Chris said:
Hello group. I'm really stuck and don't know what I'm doing here so any
advice would be appreciated.

Every client has alot of companies that they owe money to.
I have a report that is based on a query.

I would like the user to select a client, click the print button and the
report will produce a list of the compainies they owe money to.

The OpenReport Method of DoCmd includes an optional WHERE argument where you can
specify a filter for the report when opened. Check the Help file for specifics.

For example, if you were using a form and selected a Company from a ComboBox
named CompanyID the command would like...

DoCmd.OpenReport "ReportName", acViewPreview,, "CompanyID = " & Me.CompanyID
 

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