Re: Multiply Query



On Aug 10, 7:21 am, "dan.cawtho...@xxxxxxxxx"
<dan.cawtho...@xxxxxxxxx> wrote:
Hi All,

I was wondering how do i create a form type dialog with several
option, and depending on the options that are selected it filters out
the results,

Ive created a query, relating to me project table,

i have created a unbound form, and added all the required fields which
are combo's extra and the linked all the associated fields under the
criteria field on the query back to the dialog form i've created.

the dialog search form works fine, only if something is selected on
each field.

What I'm actualy asking is that if the a particular wanted to ignore
say the Quoted Combo and left it blank the query would display both
Quoted and Non Quoted projects, depending on what the other criteria
was used of course!

does that make sense?

What you need to do (and it sounds like you may already be doing it)
is to parse a SQL string based on the current settings of several on-
screen controls. Presumeably, the trigger is the change event for
each control. If some of these controls are textboxes which may be
blank, then you want to test for NULL, and parse the SQL command
accordingly.
I have found it useful to divide up the SQL string into substrings
each represented by a global variable with module scope and then
assemble them into the final string at the end.

.



Relevant Pages

  • Re: query that searches from multi fields on a form
    ... You iterate thru the controls that hold the data you want in your query. ... Then generate an SQL string. ... dim strWhere as string ...
    (microsoft.public.access.queries)
  • Re: "Daisy Chaining" Queries
    ... >a Query and the selection fields are Date, ... >each of these selection criteria there can be a value or it can be "is ... building up a SQL string using only those ... controls which contain a criterion. ...
    (microsoft.public.access.queries)
  • Re: Thursday Count
    ... misread some of my SQL string. ... With this table and query, I can accomplish what you are ... would then change the references in the query below to these controls, ... Step 3 is not giving me any real meaningful prompt and no matter what ...
    (microsoft.public.access.queries)
  • Re: Exclding Query Fields in a Form
    ... I use VB code to cycle through the controls and construct ... save the SQL string as a QueryDef or, make the SQL string an append query ...
    (microsoft.public.access.forms)
  • Mike, have a friendly part. You wont find it.
    ... Christopher greets by now ... depending on a square white. ... Her set was sacred, deep, and controls apart from the ...
    (sci.crypt)