Mega Code Archive

 
Categories / VisualBasic Script / Access
 

Whether Records Are Returned in a Recordset

Sub CheckARecordset()     Dim rst As ADODB.Recordset     Set rst = New ADODB.Recordset     rst.ActiveConnection = CurrentProject.Connection     rst.CursorType = adOpenStatic     rst.Open "Select * from Employees"     If Not rst.RecordCount Then       msgBox "Recordset Empty...Unable to Proceed"     End If     rst.Close     Set rst = Nothing End Sub