Filtering Queries for Forms

M

mdsmitty

Hello all,

I have an Access DB from which I am trying to create a couple of forms. I
want to create a form that users can enter filtering criteria (via a drop
down and text field), invoke a search function (either a button or by
pressing Enter), and have results returned based on their criteria. The
users will use the drop down list to select a Category then enter keywords in
a text box to search for questions and answers that are classified with the
specific category and contain any of the keywords they enter.

I have used InfoPath in the past which has the queries inherently built in,
unfortunately I am limited to using Access forms for this project. If there
is any relational information or examples with InfoPath and Access Forms, it
may help me understand how things work a little better.

Disclaimer: I am NOT a developer so dummy terms will be greatly appreciated.

Thanks in advance
Smitty
 
A

Allen Browne

Smitty, you are aware that you can create queries graphically in Access?
Just put the criteria into the Criteria row.

Certainly, a form will give you a better interface if you want to code it.
In essence, what you do is to build a filter string based on whatever
criteria the user chose in your combo and/or text box, and then apply it as
the Filter for your form.

The actual technique for building such a string is illustrated here:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
The article contains a sample database to download an pull apart to see how
it works. It illustrates working with different types of data (number, text,
date, ...), combos, text boxes, and even a range (of dates.)

If you are doing much in Access, it is certainly worth learning this
technique.
 
M

mdsmitty

Cheers Allen, I will look it up and see what I can do to figure it out.

By the way...Aussie, Aussie, Aussie...sorry, had to be done. it's the
typically greating with all of my Aussie mates from Brisbane, Gold Coast, and
Melbourne. Thanks for tolerating my typically yank humour.

I will let you know how it goes.

Smitty
 

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