recordset EOF true Please Help

G

Guest

I have a query that produces a recordset that has EOF as true. If I do a
debug.print and paste the query into a query in access I get two records.
Why would I be getting no records in the recordset.

strQry = "SELECT Distinct EleCircuitList.IDToInfo, Solodata.BibbTag FROM
eleCircuitList INNER JOIN Solodata " & _
"ON EleCircuitList.IDToInfo = Solodata.Solodatalink " & _
"WHERE (((EleCircuitList.Circuit) Like 'z*') and ((Solodata.BibbTag) like
'*" & strFind & "*'));"

Debug.Print strQry
rs.Open strQry, cn, 1
Do While rs.EOF = False

Here is the debug.print item
SELECT Distinct EleCircuitList.IDToInfo, qryLookUpItem.Tag FROM
EleCircuitList INNER JOIN qryLookUpItem ON EleCircuitList.IDToInfo =
qryLookUpItem.SDL WHERE (((EleCircuitList.Circuit) Like 'z*') and
((qryLookUpItem.Tag) like '*AJB*'));
 
J

Jeff Boyce

Cynthia

I'm confused. If you have to paste the SQL into Access to run it and get
two records, where are you trying to run it to start with?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Douglas J. Steele

Looks as though you're using ADO. The wildcard character in ADO is %, not *.
 

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