Creating a Search Form

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
 
P

Paul

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.
 
G

Guest

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
 

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