Reports-how to show a list of Criteria selection

S

Sandra

I have multple reports that are based on each trader. I
need a menu or somthing that when I select a report to
run, first comes up a list of trader initials that can be
selected for running the report. Basically, my query
requires the trader initials to be inputting when the
report is selected, but I need a listing of the initials
that can just be selected and then the reports runs.
Bottom line, no one can remember the trader initials and
the listing would help the selection process.
Sandra
 
R

Rick B

You need to create a very simple form that has one field on it. The field
should be a drop-down list with all the initials. You can pull them from a
table, query, or build the list in the property. I have a button on mine as
well. After the user makes his selection and clicks the button, the form is
hidden. (It is still open, but hidden)

In your query that your report is based off of, for the criteria under the
Trader field enter something like...

[Forms]![ReportParameter]![TraderInitials]

If you would like the option of printing all if left blank, then use:

Like [Forms]![ReportParameter]![TraderInitials] & "*"


In your report's on open event, you will need to have the form open. The
form must stay open after the user makes his/her selections so the query can
use the data.

In the reports onclose event, you would need to have the report close. I
also have it reset the value of the field to "" otherwise each time you open
the form it will default to the value from the last time it was used....

[Forms]![ReportParameter]![TraderInitials] = ""
DoCmd.Close acForm, "ReportParameter", acSaveNo

Hope that helps,

Rick B


I have multple reports that are based on each trader. I
need a menu or somthing that when I select a report to
run, first comes up a list of trader initials that can be
selected for running the report. Basically, my query
requires the trader initials to be inputting when the
report is selected, but I need a listing of the initials
that can just be selected and then the reports runs.
Bottom line, no one can remember the trader initials and
the listing would help the selection process.
Sandra
 
S

Sparky

You can also supply a filter name and where condition when opening the
report (same goes for forms). Don't supply anything and the report won't be
filtered.

<Sparky />
 
Top