F
fred
i have a find button on a form and it works, but when a
record is not found, it moves to the first record. how do
i keep it on the current record? here is my code:
If IsNull(Me.txtFind) Then
MsgBox "Please enter a Policy Number",
vbExclamation, "Input Error"
Me.txtFind.SetFocus
Exit Sub
End If
strPolNum = Me.txtFind
rst.FindFirst "PolicyNum = '" & strPolNum & "'"
If rst.NoMatch Then
MsgBox "The Policy Number was not found.",
vbExclamation, "Not Found"
End If
record is not found, it moves to the first record. how do
i keep it on the current record? here is my code:
If IsNull(Me.txtFind) Then
MsgBox "Please enter a Policy Number",
vbExclamation, "Input Error"
Me.txtFind.SetFocus
Exit Sub
End If
strPolNum = Me.txtFind
rst.FindFirst "PolicyNum = '" & strPolNum & "'"
If rst.NoMatch Then
MsgBox "The Policy Number was not found.",
vbExclamation, "Not Found"
End If