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
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