Creating a Search Form

  • Thread starter Thread starter Lloyd
  • Start date Start date
L

Lloyd

Can someone provide me with some general guidance on
creating a "search form".

I would like to give the user five or six fields that they
can supply values for or leave blank. In addition, they
might specify a report format. The form would also
contain a button that generates the selected report based
on the field values they have supplied.

Thanks for your help,

Lloyd
 
You could just use the built in search-by-form feature.

Once the users have filtered the form to show just the records they desire,
when they hit the print button you can set the filter for the report to be
the same as the filter for the form.

It is a while since I've done it, but I believe you can use:

Docmd.OpenReport "rptReportName",, Me.Filter

I have some generic form/report filtering tools (I personally prefer not to
use the search-by-form feature in production applications) that I will be
adding to my website shortly, so check there in a couple of days if you are
still working on this.
 
Thanks Paul. I think I can make your suggestion work.

In search-by-form, some of my fields display possible
values and some do not. And I can't really figure out why
(I generally want them to display). Is it determined in
the field definition in the table, settings in the control
on the form, or someplace else?

Thanks, Lloyd
 
Back
Top