Dim strSQL As String
Dim rst As ADODB.RecordsetDim lngID As Long
Let strSQL = "SELECT Det.ID, Det.EntryDate, Det.UserEntry FROM UserEntrys WHERE Det.ID=" & EID
Set rst = New ADODB.Recordset
With rst
.Open strSQL, CurrentProject.Connection, adOpenForwardOnly, adLockReadOnly
Do While Not rst.EOF
Let idnumber = !IDLet recdate = !EntryDateLet recdata = !UserEntry
rst.MoveNext
Loop.Close
End With
Set rst = Nothing
Tags: Access, find, recordset, loop, while, ADODB, select, SQL
Nenhum comentário:
Postar um comentário