Multi select form for Reports

T

Tom

Hi,
I have several queries and reports set up.
I would like to create a form which will be used as a filter to select the
client name, dates o product.
Depending on the selection, the form will start the correct Report by using
the selected filter.
Would someone please help me with this.
Thanks in advanced.
Tom
 
K

Ken Snell

Can you provide a bit more info? Do you actually have separate reports for
each selection? Or are you using a query (which needs to use the selected
values as its criteria) to be the recordsource for a single report?
 
S

Steve Schapel

Tom,

The most straightforward approach to this is to refer to the criteria
selection controls on the form, in the criteria of the query that your
report is based on. For example, in the criteria of the CustomerID
field in the query, you would put the equivalent of...
[Forms]![NameOfYourForm]![CustomerSelection]
.... where CustomerSelection is the name of the textbox or (probably)
combobox on the form where you select the customer.

This gets a bit more complex if you want to allow any of the criteria
selection options to remain blank. And this approach can become
unwieldy if you are trying to apply criteria to a large number of
fields. Can't be more specific without more detailed information
about your requirements.

- Steve Schapel, Microsoft Access MVP
 
T

Tom

I do have several queries and several reports. I was looking for a filter
which depending on the selection would shoot the rt report.
Thank you.
 
T

Tom

Thank you.
I failed to mention that I'm attached to a SQL2K database. The standar
approach of: [Forms]![NameOfYourForm]![CustomerSelection] is not working
for me. Reviewing the NorthwindCS DB I noticed the @Fieldname is used in the
input parameter in place of ' [Forms]![NameOfYourForm]![CustomerSelection]'
set in query, but I'm not clear.



Steve Schapel said:
Tom,

The most straightforward approach to this is to refer to the criteria
selection controls on the form, in the criteria of the query that your
report is based on. For example, in the criteria of the CustomerID
field in the query, you would put the equivalent of...
[Forms]![NameOfYourForm]![CustomerSelection]
... where CustomerSelection is the name of the textbox or (probably)
combobox on the form where you select the customer.

This gets a bit more complex if you want to allow any of the criteria
selection options to remain blank. And this approach can become
unwieldy if you are trying to apply criteria to a large number of
fields. Can't be more specific without more detailed information
about your requirements.

- Steve Schapel, Microsoft Access MVP


Hi,
I have several queries and reports set up.
I would like to create a form which will be used as a filter to select the
client name, dates o product.
Depending on the selection, the form will start the correct Report by using
the selected filter.
Would someone please help me with this.
Thanks in advanced.
Tom
 
K

Ken Snell

I haven't worked with SQL server, so I can't give specific info about how to
structure those queries. Sorry!
 

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