Multiple Parameters in a Query



hi,
sometime people try to do too much with one query.
try queries within queries.
make a query that selects all of southeast alliance. then
use that query as source in a second query to select all
active data and so on. I have some queries that have 2,3,4
other queries in it as source.
i don't know your data structure so i'm limited to what i
can suggest but I've have used this technique in the past
successfully to narrow things down so to speak.
good luck.

>-----Original Message-----
>I've searched the discussion group and I haven't been
able to come across an
>answer to my query problem. Here's the situation:
>
>1. Select query as the basis for a report
>2. in the query, I need three conditions to be met: a)
PROGRAM equals a
>particular program name, for example, "SouthEast
Alliance"; b) STATUS =
>"Active"; c)CLOSED DATE between a range to be specified
by user
>3. for the PROGRAM field, I have coded (for this
example) the criteria =
>"SouthEast Alliance"; the STATUS criteria I have
= "Active"
>
>Basically, I need the query to first select ALL records
where PROGRAM =
>"SouthEast Alliance" then from that group, select all
Active records and
>those CLOSED records between the user specified date
range. The way I have
>the query setup doesn't do what I need because it's
reading Program AND
>Status OR Closed Date so I end up with all active
SouthEast Alliance clients
>PLUS all of the closed clients from every other program!
>
>Any suggestions on a way to design the query to do what I
need? Thank you
>for your time.
>
> - Sharon
>.
>
.



Relevant Pages

  • RE: Dynamically referencing a recordset?
    ... through that recordset to set the query parameters in VBA. ... to be the one who had to modify 1440 queries if there is a change in the ... different table schema, then you need 3, one for each record type. ... This is a database that tracks the production on records in another ...
    (microsoft.public.access.modulesdaovba)
  • Re: Was: what does "serialization" mean?
    ... > the specific queries up front. ... that the NEXT time the query is run the query is fast, ... data base, don't know squat" when in fact the Donald clone doesn't ... >> WHATEVER would probably be a separate query to summarize total sales. ...
    (comp.programming)
  • Re: Official Status of SQLServer 2005 ADP
    ... I have said that the support for SQL passthrough ... queries under MDB was bad and worst than the one offered by ADP while you ... > attempt to "pass through" every Access query against a linked ODBC ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Cluster synchronize
    ... queries per unit time. ... CPU is the ONLY bottleneck. ... increase in query capacity. ... queries that perform sequential I/O or queries performing random I/O. ...
    (microsoft.public.sqlserver.clustering)
  • Re: "Query Too Complex" Errors
    ... few dozens of queries, in the middle of which there's a long chain of ... we've been having a lot of those "Query Too ... some of the complexity in the SQL ... SQL statement you are working on. ...
    (microsoft.public.access.forms)