When users select criteria for which there is no matching records, i just want to detect whether the recordset returned is empty to display the corresponding alert message :"No records found matching ..."
I have tried (before any .movefirst command) these :
If myset.eof then ...
If myset.eof and myset.bof then ..
If myset.recordcount = -1 then ..
If myset.recordcount = 0 then
If myset.absoluteposition = -1 then
And none of them seems to work all the time. While some work sometimes, it fails to work some other times.
What is the most efficient way ?
Am I bound to go for "select count(*) from mytable where mycriteria" ???
Thanks.
I have tried (before any .movefirst command) these :
If myset.eof then ...
If myset.eof and myset.bof then ..
If myset.recordcount = -1 then ..
If myset.recordcount = 0 then
If myset.absoluteposition = -1 then
And none of them seems to work all the time. While some work sometimes, it fails to work some other times.
What is the most efficient way ?
Am I bound to go for "select count(*) from mytable where mycriteria" ???
Thanks.