3 replies
by roc180
The following code will work
Sub Test_Find()
Dim Rst As Recordset
Dim AccessDB as Database
Set AcessDB=OpenDatabase("C:\My.mdb")
Set Rst = AccessDB.OpenRecordset("SELECT * FROM TBL1", dbOpenDynaset)
With Rst
If .RecordCount > 0 Then
.MoveFirst
.FindFirst "F_Name LIKE 'n*'"
If .NoMatch Then
MsgBox "No Recs match search"
Else
MsgBox "Found Record!!!" End If
End If
.Close
End With
Set Rst = Nothing
AcessDB.close
Set AcessDB=Nothing
End Sub
Good Luck
Neal Martinelli
by alex
Your code sample did help me figure out what i wanted to do, round about. One problem I still have is in the following line :
.FindFirst "F_Name LIKE 'n*'"
in making n a string variable that is retrieved from a text box input. If you couldemail that answer that'd be great! Thx
by alex
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending