|
-
Oct 27th, 2000, 07:07 PM
#1
Thread Starter
Lively Member
Dim WithEvents adoBedRS As Recordset
Private Sub Form_Load()
Dim SQL As String
Set adoBedRS = New Recordset
adoBedRS.Open "select BEDname,BEDSIZE from BED", Conn1, dbOpenDynaset, adLockOptimistic
adoBedRS.findfirst "bed=1" ' this won't work why ??
End Sub
-
Oct 27th, 2000, 07:10 PM
#2
Thread Starter
Lively Member
how do i do to move the cursor to the record i've just found ??
-
Oct 28th, 2000, 09:40 AM
#3
Hyperactive Member
You are using ADO, and ADO does not have a .FindFirst
method. To find the first record that matches the criteria,
move to the first record and then execute the .Find method,
like this:
Code:
adoBedRS.MoveFirst
adoBedRS.Find "bed = 1"
If adoBedRS.EOF Then
MsgBox "Record Not Found"
Else
MsgBox "Record Found"
End If
For your second question, when you find a record, the cursor
is already pointing to it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|