checking if recordset comes up empty ADODB/VB6

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i want to run a procedure if a recordset comes up empty....what is the
correct syntax?

Do While Not rstRecordSet.EOF
If rstRecordSet("ID") = Empty Then
MsgBox stempGlobal, vbCritical, "record not found"
'run procedure
Else
MsgBox rstRecordSet("PT_ID"), vbCritical, "record Found"
End If
 
PB,

FYI this is either a VB6 nor an ADODB newsgroup. Probably do you have a
better change in newsgroups special for those.

Cor
 
pb,

If rstRecordSet.BOF AND rstRecordSet.EOF Then
MsgBox "Record not found"
Else
'Process the records
End If

Note that you might want to use the newsgroups for VB6 and/or ADODB.

Kerry Moorman
 
Back
Top