Why does this criteria do this?

  • Thread starter Thread starter hje
  • Start date Start date
H

hje

I have been enthusiastically following Tom Jones' postings
since they were a similar question to my own. I
incorporated the suggestions into my own query and the
results are perfect. However, I dont understand something
that Access did and am looking for an explanation.

I used a wildcard search from a form and fed it into a
query using the Criteria Row in the Design View of the
query. This is what I typed into the Title Field of the
query:

(([Table2].[Title] Like "*" & [Forms]![search_system]!
[txtName] & "*") OR ([Forms]![search_system]![txtName] is
null))

This does the wildcard searching on my form beautifully,
allowing users to type in any part of the title. However,
whenever I look back into the design view of the query, it
has mangled the code, creating an extra column on the end
of the field list, splitting the code between rows and
just not looking right. However, whenever I implement the
form, it works fine.

Is access just messing up my code entry? How can I see
the code complete again in its entirety for the query?

Thanks from this happy but befuddled newbie.
 
Hi ,

My name is Dennis Schmidt. Thank you for using the Microsoft Newsgroups.

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Actually, what happens when you close and open a query is that Access
"optimizes" the query to make it perform more efficiently. The addition of
column and change of the code is the result of this optimizing.

Need quick answers to questions like these? The Microsoft Knowledge Base
provides a wealth of information that you can use to troubleshoot a problem
or answer a question! It's located at
http://support.microsoft.com/support/c.asp?M=F>.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

Regards,
Dennis Schmidt
Microsoft Support
 
Back
Top