Access Search on Access Table

Joined
May 31, 2012
Messages
6
Reaction score
0
Please help with this code, it searches the appintmentsID table and suppose to return results based on the ID you searched. It currently does not return anything, though i searched and ID that exists.

Private Sub btnSearch_Click()
Dim rs As Object
Set rs = Me.RecordsetClone
With rs
If Nz(Me.txtSearch, "") <> "" Then
.FindFirst "AppointmentID = " & Me.txtSearch
If Not .NoMatch Then
Me.Bookmark = .Bookmark
Else
MsgBox "No results for Appointment ID: " & Me.txtSearch
End If
Else
MsgBox "Please enter an appointment ID"
End If
End With
Set rs = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top