Finds with multiple criteria

  • Thread starter Thread starter Chris Howard
  • Start date Start date
C

Chris Howard

Hello

I am a new Access developer and I am trying to create a way for a user
to run an easy find from a form that contains several criteria.

The solution is a database that tracks an art collection (about 250
pieces).

I know that there will be an underlying query created, but i am thinking
that the user may select from several unbound controls that reflect the
contents of fields. Then those selections are popped into the query.

I need some help here.

TIA.

Chris
 
The best solution is to build a custom "query by form" that builds a filter
based on the criteria the user enters. For examples, see the frmBookSearch
form in the Books sample database or the frmContractSearch form in the
Entertain sample database that you can download from my website:

http://www.viescas.com/Info/links.htm#Downloads

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out" (coming soon)
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 
John,

Thanks!
I'll check it out.

Chris
-----Original Message-----
The best solution is to build a custom "query by form" that builds a filter
based on the criteria the user enters. For examples, see the frmBookSearch
form in the Books sample database or the frmContractSearch form in the
Entertain sample database that you can download from my website:

http://www.viescas.com/Info/links.htm#Downloads

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out" (coming soon)
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)



.
 
John

Thanks for the pointer to your sample databases. They were very useful
to look through.

I realized, though, that my original question was not specific enough. I
need to create an interface that will allow for OR searches as well as
AND. I may want, for example, multiple Artists. The Query by Form in
Books did not seem to allow for that - it looked as though you could
choose a series of fields and make ONE selection per field.

Or did I miss something? (totally possible.sigh ;-))_

Chris
 
Chris-

Take a look at frmClubSearch in Entertain -- it allows a search on multiple
music styles (using an IN predicate, which is the same as multiple OR
tests). It uses a rather sloppy hidden control to accumulate the styles
which could be done more cleanly in a static or module variable, but it
should give you the idea.

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out" (coming soon)
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 
Back
Top