-
how does one determine if a recordset is opened or closed?
i tried
Code:
if rs.open then
msgbox "Record is open
else
msgbox "Record is closed"
end if
it didn't work, and i didn't expect it to work
but i thought i would give it a shot before posting a message on it
thanks
-
nevermind
just answered my own question
if anyone wants to knw how
you check for if RS.State = adStateOpen
-
Here is another way Kovan
Code:
'Good for closing recordset's, connection, workspaces
If Not rs Is Nothing Then
rs.Close
Set rs = Nothing
End If
'Something similar to yours.
If Not rs Is Nothing Then
msgbox = "Recordset is open"
else
msgbox ="Recordset is closed"
End If
I had some problems that if the recordset was closed the adStateOpen returned an error. Not sure if it was my programming though.