How do I stop the error "no current record" when I use the search method below. If the user enters a valid search string, the record is displayed no problem, but if they search for a non existant record, there is a visual basic created msgbox "No Current Record". Is there a way to stop this so that nothing happens?
With frmMain!Data1.Recordset
varBookmark = .Bookmark
.Index = "LastName"
.Seek "=", txtSearchLast.Text
frmSearchPop.Hide
Unload frmSearchPop
frmMain.Enabled = True
frmMain!txtFirstName.SetFocus
If .NoMatch Then
.Bookmark = varBookmark
frmSearchPop.Show
End If
End With -
Looking Toward The Future
With frmMain!Data1.Recordset
varBookmark = .Bookmark
.Index = "LastName"
.Seek "=", txtSearchLast.Text
frmSearchPop.Hide
Unload frmSearchPop
frmMain.Enabled = True
frmMain!txtFirstName.SetFocus
If .NoMatch Then
.Bookmark = varBookmark
frmSearchPop.Show
End If
End With -

Looking Toward The Future