How do I check if recordset exist?

  • Thread starter Thread starter Sunny
  • Start date Start date
S

Sunny

I want to close recordset before exiting from form id any. How do I check
whether recordset is exist or not?

Thanks.
 
Hi Sunny,

I wouldn't bother checking, I'd just try to close it and ignore the
error this may raise:

Dim rsR as Recordset

...

On Error Resume Next
rsR.Close
On Error Goto 0
Set rsR = Nothing
 
Back
Top