0

This seems so dumb. I have a table with a long text (aka Memo) field, and the text format is set to Rich Text. Of course I can open the table directly or through an Access form.

What I cannot do is open the table in an ADODB recordset. Or I should say, maybe it does open (since there's no error). But it finds no rows of data.

I use a query with the ADODB recordset. I can paste the query directly into the query editor and it works. I'm using CurrentProject.Connection to connect.

Again, this doesn't generate an error. It simply retrieves no rows.

Scott Pendleton
  • 1,021
  • 3
  • 16
  • 32
  • 1
    Does the same query returns rows if you use it to load a DAO recordset? If yes, perhaps your query uses a `LIKE` pattern in its `WHERE` clause. And then for ADO you would need to substitute `%` and `_` for the `*` and `?` wild cards in the pattern. That was only speculation, but if it's not the problem, show us the SQL from the query. – HansUp Dec 12 '15 at 16:12

1 Answers1

1

HansUp correctly identified the problem. The query was written using "... Like (*SearchTerm*) ..."

When run from the query editor window, no problem. But ADODB found no records.

On the other hand, changing the query to "... Like (%SearchTerm%) ..." returns no records in the query editor window, yet does return records when opened by ADODB.

Thanks!

Scott Pendleton
  • 1,021
  • 3
  • 16
  • 32