searching more than one field

Mozz

New member
Local time
Today, 18:37
Joined
Apr 3, 2006
Messages
6
Hello,

I'm new to using Access, and come from a library background, and I'm trying to use Access to build a library database. So far it's going well, but when it comes to searching using a form and applying a filter I can only get it to search one field at a time, and really I want to search two or more depending on which field I'm using.

Is this possible? and how do I do it?

Any help very would be gratefully received.

Thanks

Mozz
 
Build a query using all filtered fields and base the form on the query.
 
Ok, but how do I get the query to display all the fields, and then on the form get the filter to look at two or more fields.

For example I want the whole table to appear in a form, but want the filter to look at two fields when I filter, so when I filter a field named "Author" it will filter "Author" and a field named "Added Author", and display all those records containing an Author which appeared in "Author" or "Added Author"?

As I say I am new to this!
 
No worries - I've only been doing it myself for about a year and this forum keeps amazing me.

The query needs to have every field in your table available to query - this will then make them available to view on your form.

in the query - I'm guesssing you want them to search either or and and. i.e. author and second or just author or just second.

In which case, the query will have a criteria line under author as [Please enter author], and under second [Please enter second] on the same line. This makes them an and query.

Then under author just a [Please enter Author] and on another seperate row under second [Please enter second].

This should then, when you open the form, run the query and ask both questions and then populate the form with matching data.
 
Actually - forget that, this will bring every record back.

Need to do something I learned from this forum.

The [Please enter author] question has to be copied and placed in a blank column at then end of your query in the field name box (top box) and so does the [Please enter second].

Then you have 3 rows in your criteria window. First, [Please enter author] and [Please enter second] on the same row.
Then [Please enter author] and underneath the new expr2:[Please enter second] put is null and the 3rd [Please enter second] and under the new expr1:[Please enter author] put is null.

So match author and second, or match author and is null second, or match second and is null author.
 
Thanks four your help it's really moved me on.

Mozz
 

Users who are viewing this thread

Back
Top Bottom