Allowing data to be filtered

garywood84

Registered User.
Local time
Today, 17:52
Joined
Apr 12, 2006
Messages
168
I'm new to Access and am trying to work out the best way to achieve the following.

I need a way for users to be able to filter the data which is displayed by forms or output in reports. For example, suppose that a user wants a list of all customers in either of two specific towns with a specific date of birth.

Obviously this could be achieved using a query and setting the criteria of the towns column to be:

"Anytown 1" or "Anytown 2"

and setting the criteria of the Date of Birth column to be the specific date required, e.g.

"08/08/2006".

However, so far everything about my database has been very user friendly with forms for data entry and presentation, so I don't really want to force my users to start creating their own queries.

The alternative I'm thinking of is as follows. Provide a query to pull together the required information (from various tables) but without any specific criteria. Then create a form with a field for each of the columns in the query, and allow the user to type their critieria into these. Then, place If statements as the criteria of the query to check if there is anything typed into each box on the form and, where there is, set it as the critieria for the query, then run the query.

With the above in mind, I have two questions.

1) Is there a better, more "standard" way to achieve a system of allowing users to create customised filtered data without requiring them to write queries?

2) In some cases, e.g. like with my specification of a town above, it would be good if the user could select the town they want to filter for from a drop-down combo box, rather than typing it in and risking entering details incorrectly. However, this would obviously allow them to select only one town, and not two as was required in my example. Is there an equivalent to a combo box which would allow multiple selections?

Thanks in advance if anyone can help me - and please remember that I am new to Access so whilst I want the best possible solution, I need a plain English explanation!

Gary
 
its really simple to try and create a form like you are saying, i have created one for someone else on this forum, but i dont have it at my fingertips now.

i will try to get it on the site asap, if you would like, also, pm me to remind me.. :P

but if you have any questions regaurding it.. feel free to ask if they are before i can get the example up.
 
ok here it is, its a pretty simple main form that has data entry and searching capabilities.. it shows how to use search strings for dates and how to say in a term is contained, if its absolute etc....

i dont have much time to explain, but if you can't figure something out, feel free to ask in here, i tried to comment it pretty well..
 

Attachments

Cheers mate.

I'll have a look at this and post back any questions.

Gary
 

Users who are viewing this thread

Back
Top Bottom