PC Review


Reply
Thread Tools Rate Thread

Access 2000 - Query By Form

 
 
Bob Watson
Guest
Posts: n/a
 
      15th May 2006


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





 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      15th May 2006
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> 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??



 
Reply With Quote
 
Bob Watson
Guest
Posts: n/a
 
      15th May 2006

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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>>
>> 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??

>
>



 
Reply With Quote
 
Allen Browne
Guest
Posts: n/a
 
      16th May 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>>
>>> 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?



 
Reply With Quote
 
Bob Watson
Guest
Posts: n/a
 
      16th May 2006
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>
>> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> 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" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>>
>>>> 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?

>
>



 
Reply With Quote
 
Allen Browne
Guest
Posts: n/a
 
      16th May 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>
>>> 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" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> 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" <(E-Mail Removed)> wrote in message
>>>> news:%(E-Mail Removed)...
>>>>>
>>>>> 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?



 
Reply With Quote
 
Bob Watson
Guest
Posts: n/a
 
      16th May 2006

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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> 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" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>>
>>>> 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" <(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)...
>>>>> 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" <(E-Mail Removed)> wrote in message
>>>>> news:%(E-Mail Removed)...
>>>>>>
>>>>>> 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?

>
>



 
Reply With Quote
 
Bob Watson
Guest
Posts: n/a
 
      16th May 2006
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 ______


 
Reply With Quote
 
Allen Browne
Guest
Posts: n/a
 
      17th May 2006
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" <(E-Mail Removed)> wrote in message
news:%23$(E-Mail Removed)...
> 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



 
Reply With Quote
 
aaron.kempf@gmail.com
Guest
Posts: n/a
 
      17th May 2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Append query from form input - Access 2000 Aramesh Microsoft Access Queries 1 1st Nov 2008 03:28 AM
How can I use a query sum in a form formula in access 2000? =?Utf-8?B?YnJpbm1lYXQ=?= Microsoft Access Forms 1 20th Jan 2007 04:32 PM
MS Access 2000 Query By Form BrianH Microsoft Access 1 6th Jul 2006 05:56 AM
Query referencing sub-sub-form works in Access 2000 / fails in Access 2003 Bob Howard Microsoft Access Forms 1 7th May 2005 03:22 AM
code/query from form Access 2000 jb33 Microsoft Access Form Coding 2 14th Nov 2003 08:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:14 PM.