I want to be able to have a msgbox pop up if no records were found. I tried a couple of things but they did not work. Here is my orignal code without my added mess. Can someone give me a hand. Thanks.
Private Sub btnFindFirst7_Click()
Dim MySrchString As String
If IsNull(Me.txtSearch7) Then
MsgBox "Please enter a search text", vbExclamation, "No Search Entered"
Exit Sub
Else
MySrchString = Me.txtSearch7
Me.Fax.SetFocus
DoCmd.FindRecord MySrchString, acAnywhere, , acSearchAll, , acCurrent
Me.btnFindNext7.Visible = True
End If
End Sub
Private Sub btnFindFirst7_Click()
Dim MySrchString As String
If IsNull(Me.txtSearch7) Then
MsgBox "Please enter a search text", vbExclamation, "No Search Entered"
Exit Sub
Else
MySrchString = Me.txtSearch7
Me.Fax.SetFocus
DoCmd.FindRecord MySrchString, acAnywhere, , acSearchAll, , acCurrent
Me.btnFindNext7.Visible = True
End If
End Sub