Query Problem in VBA

K

Kevin

I have a query, which in the query builder runs fine. I
place that same query into VBA and open it using a
recordset object. In VBA it returns nothing. There is
criteria in the query which his a string value. I surround
the criteria with '" & criteria & "'. I done this in many
places within the database with no problem. Here the
recordset returns no records. I know this because
recordset.recordcount = 0.

Why! Any suggestions would be greatly appreciated!

Kevin
 
D

Dirk Goldgar

Kevin said:
I have a query, which in the query builder runs fine. I
place that same query into VBA and open it using a
recordset object. In VBA it returns nothing. There is
criteria in the query which his a string value. I surround
the criteria with '" & criteria & "'. I done this in many
places within the database with no problem. Here the
recordset returns no records. I know this because
recordset.recordcount = 0.

Why! Any suggestions would be greatly appreciated!

Kevin -

I posted a response in your original thread. Please followup in that
thread.
 

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