Multi select form for Reports

  • Thread starter Thread starter Tom
  • Start date Start date
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
 
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?
 
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
 
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.
 
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
 
I haven't worked with SQL server, so I can't give specific info about how to
structure those queries. Sorry!
 
Back
Top