View Single Post
  #2  
Old January 18th, 2009, 11:05 PM posted to microsoft.public.access.gettingstarted
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default One Query, different criteria

Perhaps this sample database will point you in the right direction. It shows
how to build WHERE clauses that can be used to filter forms/reports based on
selections/entries made by the user on the first form.

Building SQL string based on values entered into controls
http://www.accessmvp.com/KDSnell/Sam...htm#FilterForm

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"CK1 via AccessMonster.com" u48386@uwe wrote in message
news:9063843162ede@uwe...
Hi

I'd be grateful if anyone could point me in the direction of some
instructions on how to do this. I have not been able to find the answer on
Access help, nor on this forum.

In short, I would like run a query from a form using different criteria
each
time. At present I have copied the query 4 or 5 times and each time used a
seperate criteria but this makes the database clunky.

In more detail, from a Form I would like the user to run a query by
pushing
one of several buttons, each of which runs the same query using a
different
criterion. There are perhaps 10 ways to run the query, each with one or
sometimes two criteria. The criteria correspond to different fields in the
query, so the user can search for Incomplete Files, Files waiting to be
sent,
by Category, or Incomplete Files by Category etc. I want the choices laid
out
for the user to pick, therefore I expect to use several buttons, one for
each
version of the query. At present I have each button running a different
saved
query but each is an almost identical copy of the first so it seems pretty
heavy.

Hope this makes sense! How do I go about this or where do I look?
Thanks for your help
Cheers
CK1

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200901/1