AllExperts > Using MS Access 
Search      
Using MS Access
Volunteer
Answers to thousands of questions
 Home · More Using MS Access Questions · Answer Library  · Encyclopedia ·
More Using MS Access Answers
Question Library

Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Rob Henderson
Expertise
I can answer most MS Access design questions. I also welcome questions on database design and implementation and VBA programming questions. I also have expierence in application design for all the Office components (Excel, Outlook, etc).

 
   

You are here:  Experts > Computing/Technology > Business Software > Using MS Access > Different search criteria's

Using MS Access - Different search criteria's


Expert: Rob Henderson - 2/7/2005

Question
low level

In a form i want to make different selections where i can search on
for example i want to search on color, type, state etc...
how can i do this ?

Answer
Hi

At a basic level you can use filter by form - see Access help for details.

If on the other hand you want to build something that is unbound from the data and more like a search form - you will have to build this yourself.

A decent search form in Access are not straight forward.

This is because you invariably have two sections on your form - one search component and one results component.

For the search component you will have to build a series of text boxes with operators and value boxes. This is done by using SQL statements and VBA.

My own preference for this type of form is to build a results form and imbed (subform) it into the main form.

Then when I have grabbed all the user chioces I build a SQL string and assign that string as the recordsource of the subform.

As you can see this is not a two minuter as there's lots to consider.

There are various utilites out on the web that can provide the searching mechanism for you but unless you can do something with the result set - they're not much use.

I'm happy to help you out with specifics in the code and design, etc but don't have a generic search form to give you an example.

rob

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.