Results from an Access DB query

C

Clayton

I'm inserting the results of a query to my Access DB into a form. When the query has an equal sign, I get results. When my query uses 'like' as a parameter, I get no results - even though within access I do in fact get results. I also have to use a custom query with both, as in I can't just click the existing query. I actually have to create a custom query, edit it, and paste in the SQL code behind the query from the Access DB

The only time I can use the click method on the list of tables and queries associated with my DB connection, is when I select a table. None of the queries have worked

Any ideas? The only thing I've noticed between the ones that return results and the ones that do not, is the 'equal' qualifier versus the 'like' qualifier.
 
B

Bill Schroyer

This may sound basic but are you adding default values.
A search form?
Did your try making the query in Access [view] and use
that instead of the table?

Bill Schroyer
(e-mail address removed)
http://www.frontpagewiz.com
-----Original Message-----
I'm inserting the results of a query to my Access DB into
a form. When the query has an equal sign, I get results.
When my query uses 'like' as a parameter, I get no
results - even though within access I do in fact get
results. I also have to use a custom query with both, as
in I can't just click the existing query. I actually have
to create a custom query, edit it, and paste in the SQL
code behind the query from the Access DB.
The only time I can use the click method on the list of
tables and queries associated with my DB connection, is
when I select a table. None of the queries have worked.
Any ideas? The only thing I've noticed between the ones
that return results and the ones that do not, is
the 'equal' qualifier versus the 'like' qualifier.
 
P

Peter

to your 1st paragraph:
the difference 'tween Access and SQL is the wildcard in a
LIKE expression. SQL's wildcard is % where Access's is *

ex.
SELECT * FROM tblpub where beer_description LIKE '%
pilsner%'

not sure if that fixes it. good luck.
-----Original Message-----
I'm inserting the results of a query to my Access DB into
a form. When the query has an equal sign, I get results.
When my query uses 'like' as a parameter, I get no
results - even though within access I do in fact get
results. I also have to use a custom query with both, as
in I can't just click the existing query. I actually have
to create a custom query, edit it, and paste in the SQL
code behind the query from the Access DB.
The only time I can use the click method on the list of
tables and queries associated with my DB connection, is
when I select a table. None of the queries have worked.
Any ideas? The only thing I've noticed between the ones
that return results and the ones that do not, is
the 'equal' qualifier versus the 'like' qualifier.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top