If your Form is assigned to a Table, you can use Me.RecordSet.MoveNext etc.
Or,
You can connect (similar to VB6) like:
VB Code:
Dim sql As String Dim rs As New ADODB.Recordset On Error GoTo Err_Handler sql = "SELECT * FROM PriceList WHERE PriceID = " & strSearchFor & "" rsPriceList.Open sql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic Do [b]Until[/b] rsPriceList.EOF 'No need to test for EOF / BOF, as Do Until will perform the same thing rsPriceList.Fields("Name").Value = NameTxt.Text rsPriceList.MoveNext Loop rs.Close Set rs = Nothing 'Your Error Handler Here




Reply With Quote