|
-
May 13th, 2000, 12:41 AM
#1
Thread Starter
Lively Member
Is there a method that I can use to determine whether a value exist in one of my table in the recordset and return true if so, otherwise false.
The method seek and find in ADO only adjust the row to point to that record.
I tried to write a global function to perform the task but don't know why fail.
Public Function RstSeek(rst As ADODB.Recordset, field As ADODB.field, value As String)
RstSeek = False
rst.MoveFirst
Do While Not rst.EOF
If (rst!field = value) Then
RstSeek = True
Exit Do
End If
rst.MoveNext
Loop
End Function
Is there something wrong with my code ? The program halted at the rst!field saying that it could not determine the object.
Thx
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
|