Hi Chris,
OOPS !!! Sorry, I missed off the Not - it should have read -
If Not (oRS1.BOF And oRS1.EOF) Then
'do some code
Else
'--NO RECORDS
End If
You are quite right, the absolute position of the recordset cann't be in two
places at once. In a new recordset the position would be at the first record
if there was one, so on that basis if it is not at BOF and it is not at EOF
then there must be some records.
Sorry for the typo. :-(
"Chris2" wrote:
"Geoffs" wrote in message
...
Hi Ennex,
Well assuming that you are using ADO to create the recordset from
your first
sql statement, then all you have to do is apply the "Filter" to get
a subset
from you first recordset.
EG: - oRS1.Filter = "[fieldname]=criteria"
'Then test for records returned
If (oRS1.BOF And oRS1.EOF) Then '--NO RECORDS
Geoffs,
Does an empty ADO recordset really display *both* BOF and EOF at the
same time?
Sincerely,
Chris O.
|