Mega Code Archive

 
Categories / VisualBasic Script / Access
 

Using the EOF Property to Determine the Bounds of a Recordset

Sub DetermineLimits()     Dim rst As ADODB.Recordset     Set rst = New ADODB.Recordset     rst.ActiveConnection = CurrentProject.Connection     rst.CursorType = adOpenStatic     rst.Open "Select * from Employees"     Do Until rst.EOF         Debug.Print rst("EmployeeID")         rst.MoveNext     Loop     rst.Close End Sub