Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Access 2000 - Query By Form

Discussion in 'Information Technology' started by Bob Watson, Jul 28, 2006.

Tags:
  1. Bob Watson

    Bob Watson
    Expand Collapse
    Guest

    I have a QBF with a "OK-Run" button on
    it which calls a macro. The macro calls
    an OpenReport for a report which is fed
    by a query. This queries datasource is
    a table which has numerous fields.

    The query criteria has six statements
    such as this

    [forms]![frmQBF1]![TimeZone] OR [forms]![frmQBF1]![TimeZone] is NULL
    [City]
    [State]
    [DMA]
    [Rank]
    [Sat_tours]


    All of these work fine EXCEPT [Sat_Tours] ... I have looked
    at this every way I can and cannot find the error. I have removed
    the textBox for Sat_Tours and put another one on it. Same result.

    The only thing I see differnt is the fieldname has an underscore
    in it. Is there something odd about a fieldname with an underscore
    in a criteria statement?

    Any other helpful thoughts??

    TIA,
    Bob
     
  2. Loading...


  3. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    The underscore in the field name should not present a problem.

    What is the data type of the Sat_tours field (when you open the table in
    design view)? What kind of control is used on your form?

    Is there anything that could be programmatically setting this to a different
    value (such as a zero-length string, which is not the same thing as null)?

    If you want a completely different approach download this example:
    http://allenbrowne.com/unlinked/Search2000.zip
    It shows how to programmatically build the filter string from only the
    controls that have a value, which is considerably more efficient. The
    example applies it to the Filter of a form, but you would do exactly the
    same thing to apply it to the WhereCondition of OpenReport.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    news:%23qExu1CeGHA.1264@TK2MSFTNGP05.phx.gbl...
    >
    > I have a QBF with a "OK-Run" button on
    > it which calls a macro. The macro calls
    > an OpenReport for a report which is fed
    > by a query. This queries datasource is
    > a table which has numerous fields.
    >
    > The query criteria has six statements
    > such as this
    >
    > [forms]![frmQBF1]![TimeZone] OR [forms]![frmQBF1]![TimeZone] is NULL
    > [City]
    > [State]
    > [DMA]
    > [Rank]
    > [Sat_tours]
    >
    >
    > All of these work fine EXCEPT [Sat_Tours] ... I have looked
    > at this every way I can and cannot find the error. I have removed
    > the textBox for Sat_Tours and put another one on it. Same result.
    >
    > The only thing I see differnt is the fieldname has an underscore
    > in it. Is there something odd about a fieldname with an underscore
    > in a criteria statement?
    >
    > Any other helpful thoughts??
     
  4. Bob Watson

    Bob Watson
    Expand Collapse
    Guest

    The allowable values for Sat_Tours are

    Always Sometimes Never

    The problem is that ALL of them show up
    no matter what is entered. You enter "Always"
    and you get all three of them. Some of the
    other things that I am building this query with
    (such as TimeZone) work the same way ... that is
    to say they have certain allowable values

    Eastern Central Rocky Mtn Pacific

    but the query with them works fine. I cannot
    figure out what the difference is.

    I will look at the download you suggest.

    Thanks,
    Bob Watson

    ______________________________________


    "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    news:OsVCc7CeGHA.3388@TK2MSFTNGP05.phx.gbl...
    > The underscore in the field name should not present a problem.
    >
    > What is the data type of the Sat_tours field (when you open the table in
    > design view)? What kind of control is used on your form?
    >
    > Is there anything that could be programmatically setting this to a
    > different value (such as a zero-length string, which is not the same thing
    > as null)?
    >
    > If you want a completely different approach download this example:
    > http://allenbrowne.com/unlinked/Search2000.zip
    > It shows how to programmatically build the filter string from only the
    > controls that have a value, which is considerably more efficient. The
    > example applies it to the Filter of a form, but you would do exactly the
    > same thing to apply it to the WhereCondition of OpenReport.
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia.
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    > "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    > news:%23qExu1CeGHA.1264@TK2MSFTNGP05.phx.gbl...
    >>
    >> I have a QBF with a "OK-Run" button on
    >> it which calls a macro. The macro calls
    >> an OpenReport for a report which is fed
    >> by a query. This queries datasource is
    >> a table which has numerous fields.
    >>
    >> The query criteria has six statements
    >> such as this
    >>
    >> [forms]![frmQBF1]![TimeZone] OR [forms]![frmQBF1]![TimeZone] is NULL
    >> [City]
    >> [State]
    >> [DMA]
    >> [Rank]
    >> [Sat_tours]
    >>
    >>
    >> All of these work fine EXCEPT [Sat_Tours] ... I have looked
    >> at this every way I can and cannot find the error. I have removed
    >> the textBox for Sat_Tours and put another one on it. Same result.
    >>
    >> The only thing I see differnt is the fieldname has an underscore
    >> in it. Is there something odd about a fieldname with an underscore
    >> in a criteria statement?
    >>
    >> Any other helpful thoughts??

    >
    >
     
  5. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    When you open the table in design view, what is the data type of this field?

    What kind of control is on your form? Combo? Option Group? Text box?

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    news:etO7QCGeGHA.5016@TK2MSFTNGP04.phx.gbl...
    >
    > The allowable values for Sat_Tours are
    >
    > Always Sometimes Never
    >
    > The problem is that ALL of them show up
    > no matter what is entered. You enter "Always"
    > and you get all three of them. Some of the
    > other things that I am building this query with
    > (such as TimeZone) work the same way ... that is
    > to say they have certain allowable values
    >
    > Eastern Central Rocky Mtn Pacific
    >
    > but the query with them works fine. I cannot
    > figure out what the difference is.
    >
    > I will look at the download you suggest.
    >
    > Thanks,
    > Bob Watson
    >
    > ______________________________________
    >
    >
    > "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    > news:OsVCc7CeGHA.3388@TK2MSFTNGP05.phx.gbl...
    >> The underscore in the field name should not present a problem.
    >>
    >> What is the data type of the Sat_tours field (when you open the table in
    >> design view)? What kind of control is used on your form?
    >>
    >> Is there anything that could be programmatically setting this to a
    >> different value (such as a zero-length string, which is not the same
    >> thing as null)?
    >>
    >> If you want a completely different approach download this example:
    >> http://allenbrowne.com/unlinked/Search2000.zip
    >> It shows how to programmatically build the filter string from only the
    >> controls that have a value, which is considerably more efficient. The
    >> example applies it to the Filter of a form, but you would do exactly the
    >> same thing to apply it to the WhereCondition of OpenReport.
    >>
    >> "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    >> news:%23qExu1CeGHA.1264@TK2MSFTNGP05.phx.gbl...
    >>>
    >>> I have a QBF with a "OK-Run" button on
    >>> it which calls a macro. The macro calls
    >>> an OpenReport for a report which is fed
    >>> by a query. This queries datasource is
    >>> a table which has numerous fields.
    >>>
    >>> The query criteria has six statements
    >>> such as this
    >>>
    >>> [forms]![frmQBF1]![TimeZone] OR [forms]![frmQBF1]![TimeZone] is NULL
    >>> [City]
    >>> [State]
    >>> [DMA]
    >>> [Rank]
    >>> [Sat_tours]
    >>>
    >>>
    >>> All of these work fine EXCEPT [Sat_Tours] ... I have looked
    >>> at this every way I can and cannot find the error. I have removed
    >>> the textBox for Sat_Tours and put another one on it. Same result.
    >>>
    >>> The only thing I see differnt is the fieldname has an underscore
    >>> in it. Is there something odd about a fieldname with an underscore
    >>> in a criteria statement?
     
  6. Bob Watson

    Bob Watson
    Expand Collapse
    Guest

    The field (Sat_Tours) is Text Size 50.

    The control on the form is a TextBox.
    It is one of many (six I think) textBoxes
    on the form which feed the query.

    Thanks, Bob

    -------
    "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    news:%23y2JKUIeGHA.2188@TK2MSFTNGP05.phx.gbl...
    > When you open the table in design view, what is the data type of this
    > field?
    >
    > What kind of control is on your form? Combo? Option Group? Text box?
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia.
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    > "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    > news:etO7QCGeGHA.5016@TK2MSFTNGP04.phx.gbl...
    >>
    >> The allowable values for Sat_Tours are
    >>
    >> Always Sometimes Never
    >>
    >> The problem is that ALL of them show up
    >> no matter what is entered. You enter "Always"
    >> and you get all three of them. Some of the
    >> other things that I am building this query with
    >> (such as TimeZone) work the same way ... that is
    >> to say they have certain allowable values
    >>
    >> Eastern Central Rocky Mtn Pacific
    >>
    >> but the query with them works fine. I cannot
    >> figure out what the difference is.
    >>
    >> I will look at the download you suggest.
    >>
    >> Thanks,
    >> Bob Watson
    >>
    >> ______________________________________
    >>
    >>
    >> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    >> news:OsVCc7CeGHA.3388@TK2MSFTNGP05.phx.gbl...
    >>> The underscore in the field name should not present a problem.
    >>>
    >>> What is the data type of the Sat_tours field (when you open the table in
    >>> design view)? What kind of control is used on your form?
    >>>
    >>> Is there anything that could be programmatically setting this to a
    >>> different value (such as a zero-length string, which is not the same
    >>> thing as null)?
    >>>
    >>> If you want a completely different approach download this example:
    >>> http://allenbrowne.com/unlinked/Search2000.zip
    >>> It shows how to programmatically build the filter string from only the
    >>> controls that have a value, which is considerably more efficient. The
    >>> example applies it to the Filter of a form, but you would do exactly the
    >>> same thing to apply it to the WhereCondition of OpenReport.
    >>>
    >>> "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    >>> news:%23qExu1CeGHA.1264@TK2MSFTNGP05.phx.gbl...
    >>>>
    >>>> I have a QBF with a "OK-Run" button on
    >>>> it which calls a macro. The macro calls
    >>>> an OpenReport for a report which is fed
    >>>> by a query. This queries datasource is
    >>>> a table which has numerous fields.
    >>>>
    >>>> The query criteria has six statements
    >>>> such as this
    >>>>
    >>>> [forms]![frmQBF1]![TimeZone] OR [forms]![frmQBF1]![TimeZone] is NULL
    >>>> [City]
    >>>> [State]
    >>>> [DMA]
    >>>> [Rank]
    >>>> [Sat_tours]
    >>>>
    >>>>
    >>>> All of these work fine EXCEPT [Sat_Tours] ... I have looked
    >>>> at this every way I can and cannot find the error. I have removed
    >>>> the textBox for Sat_Tours and put another one on it. Same result.
    >>>>
    >>>> The only thing I see differnt is the fieldname has an underscore
    >>>> in it. Is there something odd about a fieldname with an underscore
    >>>> in a criteria statement?

    >
    >
     
  7. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    Okay, nothing unusual about that.

    How about posting the query statement. (Switch to SQL View.)
    There may be a problem with unbracketed ANDs and ORs.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    news:um1jcvIeGHA.3996@TK2MSFTNGP04.phx.gbl...
    > The field (Sat_Tours) is Text Size 50.
    >
    > The control on the form is a TextBox.
    > It is one of many (six I think) textBoxes
    > on the form which feed the query.
    >
    > Thanks, Bob
    >
    > -------
    > "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    > news:%23y2JKUIeGHA.2188@TK2MSFTNGP05.phx.gbl...
    >> When you open the table in design view, what is the data type of this
    >> field?
    >>
    >> What kind of control is on your form? Combo? Option Group? Text box?
    >>
    >> --
    >> Allen Browne - Microsoft MVP. Perth, Western Australia.
    >> Tips for Access users - http://allenbrowne.com/tips.html
    >> Reply to group, rather than allenbrowne at mvps dot org.
    >>
    >> "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    >> news:etO7QCGeGHA.5016@TK2MSFTNGP04.phx.gbl...
    >>>
    >>> The allowable values for Sat_Tours are
    >>>
    >>> Always Sometimes Never
    >>>
    >>> The problem is that ALL of them show up
    >>> no matter what is entered. You enter "Always"
    >>> and you get all three of them. Some of the
    >>> other things that I am building this query with
    >>> (such as TimeZone) work the same way ... that is
    >>> to say they have certain allowable values
    >>>
    >>> Eastern Central Rocky Mtn Pacific
    >>>
    >>> but the query with them works fine. I cannot
    >>> figure out what the difference is.
    >>>
    >>> I will look at the download you suggest.
    >>>
    >>> Thanks,
    >>> Bob Watson
    >>>
    >>> ______________________________________
    >>>
    >>>
    >>> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    >>> news:OsVCc7CeGHA.3388@TK2MSFTNGP05.phx.gbl...
    >>>> The underscore in the field name should not present a problem.
    >>>>
    >>>> What is the data type of the Sat_tours field (when you open the table
    >>>> in design view)? What kind of control is used on your form?
    >>>>
    >>>> Is there anything that could be programmatically setting this to a
    >>>> different value (such as a zero-length string, which is not the same
    >>>> thing as null)?
    >>>>
    >>>> If you want a completely different approach download this example:
    >>>> http://allenbrowne.com/unlinked/Search2000.zip
    >>>> It shows how to programmatically build the filter string from only the
    >>>> controls that have a value, which is considerably more efficient. The
    >>>> example applies it to the Filter of a form, but you would do exactly
    >>>> the same thing to apply it to the WhereCondition of OpenReport.
    >>>>
    >>>> "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    >>>> news:%23qExu1CeGHA.1264@TK2MSFTNGP05.phx.gbl...
    >>>>>
    >>>>> I have a QBF with a "OK-Run" button on
    >>>>> it which calls a macro. The macro calls
    >>>>> an OpenReport for a report which is fed
    >>>>> by a query. This queries datasource is
    >>>>> a table which has numerous fields.
    >>>>>
    >>>>> The query criteria has six statements
    >>>>> such as this
    >>>>>
    >>>>> [forms]![frmQBF1]![TimeZone] OR [forms]![frmQBF1]![TimeZone] is NULL
    >>>>> [City]
    >>>>> [State]
    >>>>> [DMA]
    >>>>> [Rank]
    >>>>> [Sat_tours]
    >>>>>
    >>>>>
    >>>>> All of these work fine EXCEPT [Sat_Tours] ... I have looked
    >>>>> at this every way I can and cannot find the error. I have removed
    >>>>> the textBox for Sat_Tours and put another one on it. Same result.
    >>>>>
    >>>>> The only thing I see differnt is the fieldname has an underscore
    >>>>> in it. Is there something odd about a fieldname with an underscore
    >>>>> in a criteria statement?
     
  8. Bob Watson

    Bob Watson
    Expand Collapse
    Guest

    Gracious ... it is below and very bizarre looking.
    Bob
    -------------------

    SQL View Follows:

    SELECT [Station Information].Sat_Tours, [Station Information].Station,
    [Station Information].Affliate, [Station Information].Contact, [Station
    Information].AlternateContact, [Station Information].Anchor, [Station
    Information].NewsRoom, [Station Information].ControlRoom, [Station
    Information].IFB, [Station Information].FaxNumber, [Station
    Information].Email, [Station Information].NewsRoomext, [Station
    Information].ControlRoomext, [Station Information].IFBext, [Station
    Information].city, [Station Information].state, [Station
    Information].hotlist, [Station Information].Rank, [Station Information].DMA,
    [Station Information].ProducerDirectLine, [Station
    Information].ProducerDirectExt, [Station Information].EMail_2, [Station
    Information].AM_Producer, [Station Information].Noon_Producer, [Station
    Information].Health_Producer, [Station Information].Sports_Producer,
    [Station Information].TimeZone, [Station Information].BestTimeToCall,
    [Station Information].Notes, [Station Information].BizConsumer, [Station
    Information].Education, [Station Information].Radio, [Station
    Information].TV, [Station Information].Notes2, [Station Information].Notes3,
    [Station Information].Notes4, [Station Information].Notes5
    FROM [Station Information]
    WHERE ((([Station Information].Sat_Tours)=[Forms]![frmQBF1]![text15]) AND
    (([Station Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND
    (([Station Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone])) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![text15]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone])) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone])) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone])) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null)) OR ((([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edState]) Is Null)) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edState]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null)) OR ((([Station Information].Rank)=[Forms]![frmQBF1]![edRank]) AND
    (([Station Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edRank]) Is Null)) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edRank]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null)) OR ((([Station Information].state)=[Forms]![frmQBF1]![edState]) AND
    (([Station Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null)) OR ((([Station Information].city)=[Forms]![frmQBF1]![edCity]) AND
    (([Station Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edRank]) Is Null)) OR ((([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edRank]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND (([Forms]![frmQBF1]![edDMA])
    Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station Information].state)=[Forms]![frmQBF1]![edState]) AND
    (([Station Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station Information].city)=[Forms]![frmQBF1]![edCity]) AND
    (([Station Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edRank]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station Information].city)=[Forms]![frmQBF1]![edCity]) AND
    (([Station Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edRank]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edRank]) Is Null) AND
    (([Forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].TimeZone)=[Forms]![frmQBF1]![edTimeZone]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edRank]) Is Null) AND
    (([Forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edTimeZone])
    Is Null)) OR ((([Station Information].state)=[Forms]![frmQBF1]![edState])
    AND (([Station Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edTimeZone])
    Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edRank]) Is Null) AND (([Forms]![frmQBF1]![edTimeZone])
    Is Null)) OR ((([Station Information].city)=[Forms]![frmQBF1]![edCity]) AND
    (([Station Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edRank]) Is Null) AND (([Forms]![frmQBF1]![edTimeZone])
    Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edRank]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].DMA)=[Forms]![frmQBF1]![edDMA]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edRank]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND
    (([Forms]![frmQBF1]![edDMA]) Is Null) AND (([Forms]![frmQBF1]![edTimeZone])
    Is Null)) OR ((([Station Information].city)=[Forms]![frmQBF1]![edCity]) AND
    (([Station Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND (([Forms]![frmQBF1]![edDMA])
    Is Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Rank)=[Forms]![frmQBF1]![edRank]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND
    (([Forms]![frmQBF1]![edRank]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edRank]) Is Null) AND (([Forms]![frmQBF1]![edDMA]) Is
    Null) AND (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].state)=[Forms]![frmQBF1]![edState]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND (([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].city)=[Forms]![frmQBF1]![edCity]) AND
    (([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edState]) Is Null) AND (([Forms]![frmQBF1]![edRank]) Is
    Null) AND (([Forms]![frmQBF1]![edDMA]) Is Null) AND
    (([Forms]![frmQBF1]![edTimeZone]) Is Null)) OR ((([Station
    Information].Affliate)=[Forms]![frmQBF1]![edAffiliate]) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edRank]) Is Null) AND
    (([Forms]![frmQBF1]![edDMA]) Is Null) AND (([Forms]![frmQBF1]![edTimeZone])
    Is Null)) OR ((([Forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([Forms]![frmQBF1]![edCity]) Is Null) AND (([Forms]![frmQBF1]![edState]) Is
    Null) AND (([Forms]![frmQBF1]![edRank]) Is Null) AND
    (([Forms]![frmQBF1]![edDMA]) Is Null) AND (([Forms]![frmQBF1]![edTimeZone])
    Is Null));




    "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    news:OhqnHPJeGHA.4040@TK2MSFTNGP05.phx.gbl...
    > Okay, nothing unusual about that.
    >
    > How about posting the query statement. (Switch to SQL View.)
    > There may be a problem with unbracketed ANDs and ORs.
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia.
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    > "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    > news:um1jcvIeGHA.3996@TK2MSFTNGP04.phx.gbl...
    >> The field (Sat_Tours) is Text Size 50.
    >>
    >> The control on the form is a TextBox.
    >> It is one of many (six I think) textBoxes
    >> on the form which feed the query.
    >>
    >> Thanks, Bob
    >>
    >> -------
    >> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    >> news:%23y2JKUIeGHA.2188@TK2MSFTNGP05.phx.gbl...
    >>> When you open the table in design view, what is the data type of this
    >>> field?
    >>>
    >>> What kind of control is on your form? Combo? Option Group? Text box?
    >>>
    >>> --
    >>> Allen Browne - Microsoft MVP. Perth, Western Australia.
    >>> Tips for Access users - http://allenbrowne.com/tips.html
    >>> Reply to group, rather than allenbrowne at mvps dot org.
    >>>
    >>> "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    >>> news:etO7QCGeGHA.5016@TK2MSFTNGP04.phx.gbl...
    >>>>
    >>>> The allowable values for Sat_Tours are
    >>>>
    >>>> Always Sometimes Never
    >>>>
    >>>> The problem is that ALL of them show up
    >>>> no matter what is entered. You enter "Always"
    >>>> and you get all three of them. Some of the
    >>>> other things that I am building this query with
    >>>> (such as TimeZone) work the same way ... that is
    >>>> to say they have certain allowable values
    >>>>
    >>>> Eastern Central Rocky Mtn Pacific
    >>>>
    >>>> but the query with them works fine. I cannot
    >>>> figure out what the difference is.
    >>>>
    >>>> I will look at the download you suggest.
    >>>>
    >>>> Thanks,
    >>>> Bob Watson
    >>>>
    >>>> ______________________________________
    >>>>
    >>>>
    >>>> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    >>>> news:OsVCc7CeGHA.3388@TK2MSFTNGP05.phx.gbl...
    >>>>> The underscore in the field name should not present a problem.
    >>>>>
    >>>>> What is the data type of the Sat_tours field (when you open the table
    >>>>> in design view)? What kind of control is used on your form?
    >>>>>
    >>>>> Is there anything that could be programmatically setting this to a
    >>>>> different value (such as a zero-length string, which is not the same
    >>>>> thing as null)?
    >>>>>
    >>>>> If you want a completely different approach download this example:
    >>>>> http://allenbrowne.com/unlinked/Search2000.zip
    >>>>> It shows how to programmatically build the filter string from only the
    >>>>> controls that have a value, which is considerably more efficient. The
    >>>>> example applies it to the Filter of a form, but you would do exactly
    >>>>> the same thing to apply it to the WhereCondition of OpenReport.
    >>>>>
    >>>>> "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    >>>>> news:%23qExu1CeGHA.1264@TK2MSFTNGP05.phx.gbl...
    >>>>>>
    >>>>>> I have a QBF with a "OK-Run" button on
    >>>>>> it which calls a macro. The macro calls
    >>>>>> an OpenReport for a report which is fed
    >>>>>> by a query. This queries datasource is
    >>>>>> a table which has numerous fields.
    >>>>>>
    >>>>>> The query criteria has six statements
    >>>>>> such as this
    >>>>>>
    >>>>>> [forms]![frmQBF1]![TimeZone] OR [forms]![frmQBF1]![TimeZone] is NULL
    >>>>>> [City]
    >>>>>> [State]
    >>>>>> [DMA]
    >>>>>> [Rank]
    >>>>>> [Sat_tours]
    >>>>>>
    >>>>>>
    >>>>>> All of these work fine EXCEPT [Sat_Tours] ... I have looked
    >>>>>> at this every way I can and cannot find the error. I have removed
    >>>>>> the textBox for Sat_Tours and put another one on it. Same result.
    >>>>>>
    >>>>>> The only thing I see differnt is the fieldname has an underscore
    >>>>>> in it. Is there something odd about a fieldname with an underscore
    >>>>>> in a criteria statement?

    >
    >
     
  9. Bob Watson

    Bob Watson
    Expand Collapse
    Guest

    OK - Mr Allen - this was such a strange looking
    SQL statement that I just wipped out all the
    "criteria" and started again. After rebuilding
    the entire statement, it worked. It still looks equally
    strange (below), but it works. I need to transfer this
    SQL statement to another Access Database query. Can I just
    COPY this one and then put the 2nd MDB file query in the SQL view
    and PASTE it ??? Thanks, Bob

    ______ The one that works ______

    SELECT [Station Information].Station, [Station Information].Affliate,
    [Station Information].city, [Station Information].state, [Station
    Information].Rank, [Station Information].DMA, [Station
    Information].Sat_Tours, [Station Information].TimeZone, [Station
    Information].Contact, [Station Information].AlternateContact, [Station
    Information].Anchor, [Station Information].NewsRoom, [Station
    Information].ControlRoom, [Station Information].IFB, [Station
    Information].FaxNumber, [Station Information].Email, [Station
    Information].NewsRoomext, [Station Information].ControlRoomext, [Station
    Information].IFBext, [Station Information].hotlist, [Station
    Information].ProducerDirectLine, [Station Information].ProducerDirectExt,
    [Station Information].EMail_2, [Station Information].AM_Producer, [Station
    Information].Noon_Producer, [Station Information].Health_Producer, [Station
    Information].Sports_Producer, [Station Information].BestTimeToCall, [Station
    Information].Notes, [Station Information].BizConsumer, [Station
    Information].Education, [Station Information].Radio, [Station
    Information].TV, [Station Information].Notes2, [Station Information].Notes3,
    [Station Information].Notes4, [Station Information].Notes5
    FROM [Station Information]
    WHERE ((([Station Information].Affliate)=([forms]![frmQBF1]![edAffiliate]))
    AND (([Station Information].city)=([forms]![frmQBF1]![edCIty])) AND
    (([Station Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq]))) OR ((([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edCity]) Is Null)) OR ((([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edState]) Is Null)) OR ((([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edState]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null)) OR ((([Station Information].Rank)=([forms]![frmQBF1]![edRank])) AND
    (([Station Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edRank]) Is Null)) OR ((([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edRank]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null)) OR ((([Station Information].state)=([forms]![frmQBF1]![edState])) AND
    (([Station Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null)) OR ((([Station Information].city)=([forms]![frmQBF1]![edCIty])) AND
    (([Station Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edRank]) Is Null)) OR ((([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edRank]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND (([forms]![frmQBF1]![edDMA])
    Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station Information].state)=([forms]![frmQBF1]![edState])) AND
    (([Station Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station Information].city)=([forms]![frmQBF1]![edCIty])) AND
    (([Station Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edRank]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station Information].city)=([forms]![frmQBF1]![edCIty])) AND
    (([Station Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edRank]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edRank]) Is Null) AND
    (([forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Sat_Tours)=([forms]![frmQBF1]![edFreq])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edRank]) Is Null) AND
    (([forms]![frmQBF1]![edDMA]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edFreq]) Is
    Null)) OR ((([Station Information].state)=([forms]![frmQBF1]![edState])) AND
    (([Station Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edFreq]) Is
    Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edFreq]) Is
    Null)) OR ((([Station Information].city)=([forms]![frmQBF1]![edCIty])) AND
    (([Station Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edFreq]) Is
    Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edRank]) Is Null) AND (([forms]![frmQBF1]![edFreq]) Is
    Null)) OR ((([Station Information].city)=([forms]![frmQBF1]![edCIty])) AND
    (([Station Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edRank]) Is Null) AND (([forms]![frmQBF1]![edFreq]) Is
    Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edRank]) Is Null) AND
    (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].DMA)=([forms]![frmQBF1]![edDMA])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edRank]) Is Null) AND
    (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND
    (([forms]![frmQBF1]![edDMA]) Is Null) AND (([forms]![frmQBF1]![edFreq]) Is
    Null)) OR ((([Station Information].city)=([forms]![frmQBF1]![edCIty])) AND
    (([Station Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND (([forms]![frmQBF1]![edDMA])
    Is Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null) AND
    (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Rank)=([forms]![frmQBF1]![edRank])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null) AND
    (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND
    (([forms]![frmQBF1]![edRank]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edRank]) Is Null) AND (([forms]![frmQBF1]![edDMA]) Is
    Null) AND (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null) AND
    (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].state)=([forms]![frmQBF1]![edState])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null) AND
    (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND (([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null) AND
    (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].city)=([forms]![frmQBF1]![edCIty])) AND
    (([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edState]) Is Null) AND (([forms]![frmQBF1]![edRank]) Is
    Null) AND (([forms]![frmQBF1]![edDMA]) Is Null) AND
    (([forms]![frmQBF1]![edFreq]) Is Null)) OR ((([Station
    Information].Affliate)=([forms]![frmQBF1]![edAffiliate])) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edRank]) Is Null) AND
    (([forms]![frmQBF1]![edDMA]) Is Null) AND (([forms]![frmQBF1]![edFreq]) Is
    Null)) OR ((([forms]![frmQBF1]![edAffiliate]) Is Null) AND
    (([forms]![frmQBF1]![edCity]) Is Null) AND (([forms]![frmQBF1]![edState]) Is
    Null) AND (([forms]![frmQBF1]![edRank]) Is Null) AND
    (([forms]![frmQBF1]![edDMA]) Is Null) AND (([forms]![frmQBF1]![edFreq]) Is
    Null));

    ______ End of the one that works ______
     
  10. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    Good news.

    Absolutely, yes, you can just copy the SQL statement from one computer to
    another.

    We do that quite regularly. You have to drag the tables around to get the
    graphical view you want, and if you set up any properties on the fields
    (such as Format) those must be done again to, but the SQL statement defines
    the query.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    news:%23$xhjCReGHA.3932@TK2MSFTNGP05.phx.gbl...
    > OK - Mr Allen - this was such a strange looking
    > SQL statement that I just wipped out all the
    > "criteria" and started again. After rebuilding
    > the entire statement, it worked. It still looks equally
    > strange (below), but it works. I need to transfer this
    > SQL statement to another Access Database query. Can I just
    > COPY this one and then put the 2nd MDB file query in the SQL view
    > and PASTE it ??? Thanks, Bob
     
  11. aaron.kempf@gmail.com

    aaron.kempf@gmail.com
    Expand Collapse
    Guest

    how about naming the control txtSat_hours so that when you refer to
    Sat_hours you know whether you're referring to the data field or the
    textbox

    hth
     
  12. ·âù

    ·âù
    Expand Collapse
    Guest

    aaa
    "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    news:ugQkUDYeGHA.3484@TK2MSFTNGP04.phx.gbl...
    > Good news.
    >
    > Absolutely, yes, you can just copy the SQL statement from one computer to
    > another.
    >
    > We do that quite regularly. You have to drag the tables around to get the
    > graphical view you want, and if you set up any properties on the fields
    > (such as Format) those must be done again to, but the SQL statement
    > defines the query.
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia.
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    > "Bob Watson" <RMWatson3rd@bellsouth.net> wrote in message
    > news:%23$xhjCReGHA.3932@TK2MSFTNGP05.phx.gbl...
    >> OK - Mr Allen - this was such a strange looking
    >> SQL statement that I just wipped out all the
    >> "criteria" and started again. After rebuilding
    >> the entire statement, it worked. It still looks equally
    >> strange (below), but it works. I need to transfer this
    >> SQL statement to another Access Database query. Can I just
    >> COPY this one and then put the 2nd MDB file query in the SQL view
    >> and PASTE it ??? Thanks, Bob

    >
    >
     

Share This Page