Creating a filter form

S

solitudebytheshore

Hello,

I'm creating an Access stock control database and would like to filter data
based on the values a user inputs in a form.

The form will need to use text boxes, lists, combo boxes and date boxes.

When a user enters the asset number and selects "In Stock" from a list box,
I want the results to be display as a subform below the filter form.
Obviously there will be different values for "asset number" and "Stock
Status" as well as "description" and "dates" etc

I can get a subform into the main filter form, that isn't a problem at all.

What I'm struggling with is getting the choices the users make applied to
the subform. I have tried various different ways but I don't seem to be able
to make it work! I haven't used this function in Access for about 10 years!

The subform will need to display multiple results as well, so I understand
that DLookup wont work.

If possible I'd also like the subform to automatically update!

I hope all this makes some sort of sense!!

Can somebody point me in the right direction?

Thanks :)
 
A

Allen Browne

Download the example from this article:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html

It shows how to build a filter string from whichever boxes the user used,
showing the results in a continuous form.

Instead of using a subform, the example places the search boxes in the Form
Header, and shows them in the same form. You can use the same approach and
filter the subform rather than the main form if you really need a main form
for some reason.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 

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