Report based off of criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that has 6 sortable fields. The users wants a form with the
same six fields on it so he can select the data that he wants to print out on
the report. I can make my report recordsource equal to the fields on the
form, but what if he doesn't make a selection from ALL six fields? Then my
report won't print because it will assume the value is null and the query for
the report won't find any record that matches. I need a very flexible way
for the user to create an endless possibilty of reports without limitations.

Does anyone have any ideas? I think I am making this way too hard!

Thanks in advance!
 
Use...

Like [forms...] & "*"


If the field is left blank, then all records will be pulled for that item.


Rick B
 
That worked great - thanks! But it also made me realize another option.
Except for a beginning and ending date, most of the fields on the form are
combo boxes. Now if the user selects an item in the combo box, the report
sorts by that, if they don't pick anything, it shows all. - Great, but what
if they want to pick more than one item on any of the combo boxes? Do I need
to make them into multi-select list boxes instead? Any thoughts on that?

Thanks again!





Rick B said:
Use...

Like [forms...] & "*"


If the field is left blank, then all records will be pulled for that item.


Rick B



AT said:
I have a report that has 6 sortable fields. The users wants a form with the
same six fields on it so he can select the data that he wants to print out on
the report. I can make my report recordsource equal to the fields on the
form, but what if he doesn't make a selection from ALL six fields? Then my
report won't print because it will assume the value is null and the query for
the report won't find any record that matches. I need a very flexible way
for the user to create an endless possibilty of reports without limitations.

Does anyone have any ideas? I think I am making this way too hard!

Thanks in advance!
 
See
http://www.mvps.org/access/reports/rpt0005.htm
for code to filter report based on multiselect listbox.

HTH,

Kevin

AT said:
That worked great - thanks! But it also made me realize another option.
Except for a beginning and ending date, most of the fields on the form are
combo boxes. Now if the user selects an item in the combo box, the
report
sorts by that, if they don't pick anything, it shows all. - Great, but
what
if they want to pick more than one item on any of the combo boxes? Do I
need
to make them into multi-select list boxes instead? Any thoughts on that?

Thanks again!





Rick B said:
Use...

Like [forms...] & "*"


If the field is left blank, then all records will be pulled for that
item.


Rick B



AT said:
I have a report that has 6 sortable fields. The users wants a form
with the
same six fields on it so he can select the data that he wants to print
out on
the report. I can make my report recordsource equal to the fields on
the
form, but what if he doesn't make a selection from ALL six fields?
Then my
report won't print because it will assume the value is null and the
query for
the report won't find any record that matches. I need a very flexible
way
for the user to create an endless possibilty of reports without limitations.

Does anyone have any ideas? I think I am making this way too hard!

Thanks in advance!
 
Back
Top