Creating Reports based on a filter

mare

Registered User.
Local time
Today, 09:59
Joined
Jan 20, 2003
Messages
16
I have a database that captures all the documents we create for training purposes. I've created queries so that reports can be run off by business channels (and it's all nice and neat on a switchboard - click the business channel you want, and there's the report of all documents for that channel).

Now, here's the situation: I want to be able to generate a report based on a search criteria, i.e., "coaching", and that a report would come up with everything we have on coaching. I want to include a wildcard so that all titles with "coach", "coaching", "coaches", etc., would appear.

I wouldn't mind if I had to create a "search for" button on the switchboard (which would bring up a "parameter" value box in which you would type in your search) and up pops a report (which I would also create if necessary), but how would I create this query (or is it a filter?). I do have in one of my tables a field for the title of the document (TitleofDocument)

I don't mind the amount of work I would have to do on this -- the bottom line is that it is very user-friendly to others (they actually tremble at the thought of using Access!)

All suggestions would be very much appreciated.
 
Are you talking about searching just one table?

How many fields within that table do you want to be able to search?

You can set up your switchboard to open a form to allow you to enter search criteria. Call this form "SearchForm" and call the textbox for entering criteria "txtCriteria".

Design a query with all of the fields you want to be able to display.

For each field you want to be able to search in, you'll need to place the following in the criteria box:

Like "*" & [Forms]![SearchForm]![txtCriteria] & "*"

This works like a wildcard, finding any fields that contain the text you enter.

It's very important that for every additional field you want to search (more than 1), you have to step down 1 row (where it says Or:)

If you place ANY of the criteria expressions on the same row, chances are your search won't work.

Once your query is saved, set up a command button on the form to open the query.

Hope that helps.
 

Users who are viewing this thread

Back
Top Bottom