Hello Access Specialists,
I just noticed that the following statement produces the wrong record count:
"Set rstPersons = db.openrecordset("select * from Persons where LastName like '" & strLastName & "'", dbOpenDynaset)"
In the Persons file I have two records where the LastName = "Hurni".
When I build a query with "*Hurni*" as criterium it correctly gives me two records.
When I execute the statement above in a program and display the rstPersons.recordcount, it only gives me 1
What did I do wrong?
I just noticed that the following statement produces the wrong record count:
"Set rstPersons = db.openrecordset("select * from Persons where LastName like '" & strLastName & "'", dbOpenDynaset)"
In the Persons file I have two records where the LastName = "Hurni".
When I build a query with "*Hurni*" as criterium it correctly gives me two records.
When I execute the statement above in a program and display the rstPersons.recordcount, it only gives me 1
What did I do wrong?