Tom,
Here is the SQL for the regular query criteria:
SELECT DISTINCTROW Customer.Company, Customer.MaintExpireDate,
Customer.Maintdollar, Customer.[Authorized User First],
Customer.[Authorized
User Last], Customer.[Licensee First], Customer.[Licensee Last],
Customer.Addr1, Customer.Addr2, Customer.City, Customer.State,
Customer.Zip,
Customer.Country, Customer.email, Customer.sp2serialnum,
Customer.sp2version,
Customer.compilr, Customer.opsys, Customer.[num users], Customer.phone,
Customer.fax, Customer.notes, Customer.product
FROM Customer
WHERE (((Customer.Company)="John Smith"))
ORDER BY Customer.Company;
This works fine. All records show. However, when I do the Parameter
Query,
I doesn't give the same results.
Here is the SQL for the Parameter
SELECT DISTINCTROW Customer.Company, Customer.MaintExpireDate,
Customer.Maintdollar, Customer.[Authorized User First],
Customer.[Authorized
User Last], Customer.[Licensee First], Customer.[Licensee Last],
Customer.Addr1, Customer.Addr2, Customer.City, Customer.State,
Customer.Zip,
Customer.Country, Customer.email, Customer.sp2serialnum,
Customer.sp2version,
Customer.compilr, Customer.opsys, Customer.[num users], Customer.phone,
Customer.fax, Customer.notes, Customer.product
FROM Customer
WHERE (((Customer.Company)=[Enter Company Name]))
ORDER BY Customer.Company;
I thought it was simple but I'm doing something wrong. Any suggestions?
Thanks for your help!
Tracey
Tom Ellison said:
Dear Tracey:
Probably you are viewing this query in "design view". There is a control
at
the upper left of the screen (unless you have moved it) that looks a bit
like a screen rectangle with a downward arrow to the right. By default,
this is directly under the word "File". Click the down arrow and you
should
see a list of alternative view. Choose the SQL View. Copy all the text
there into your post.
Tom Ellison
The SQL for the query criteria looks like this:
WHERE (((customer, company) Like "*John Smith*"))
How do I check the SQL of the parameter?
:
Dear Tracey:
I cannot see your code, but I'm guessing it was originally:
WHERE SomeColumn LIKE "*John Smith*"
and that you then changed it to:
WHERE SomeColumn LIKE "*" & [Enter Name: ] & "*"
In the above case, entering "John Smith" should give the same results
as
the
former version. So, have you varied from this in some way?
Tom Ellison
message
Why do the wildcards work in the design criteria of a query but
don't
work
in
a parameter query?
For example:
If I have the following 4 companies listed in my database:
The John Smith Company
John Smith Inc
New World Co (John Smith)
John Smith
When entering *John Smith* in the queries criteria, all 4 records
show.
However, when entering the same thing in the parameter query, only
one
record
is found and that is John Smith. I tried various wildcards but the
results
never found all 4 records. How do I get the parameter query to find
all 4
records?