evanscamman
Registered User.
- Local time
- Today, 00:28
- Joined
- Feb 25, 2007
- Messages
- 274
I have been developing a database that is now in the implementation stage. Everything is functioning very well except that after working in the database for a couple of hours, I get this message: "Can not open any more databases." I think this may be from improperly calling and closing recordsets in VBA.
This is how I currently do it:
Am I doing something wrong that is leaving a connection open?
Thank you,
Evan
This is how I currently do it:
Code:
Dim rs As DAO.Recordset, strSQL As String
'Open Recordset to record in tblUOM
strSQL = "SELECT tblItemUOM.*, tblItemUOM.ItemUOMID FROM tblItemUOM WHERE (((tblItemUOM.ItemUOMID)=" & lngUOM & "));"
Set rs = CurrentDb.OpenRecordset(strSQL)
If Not rs.EOF Then
rs.MoveFirst
'Do something here...
End If
Cleanup:
rs.Close
Set rs = Nothing
Am I doing something wrong that is leaving a connection open?
Thank you,
Evan