Here's some boilerplate search code, to do this.
If MyRecordID is defined as Text:
Code:
Private Sub btnSearch_Click()
If Not IsNull(Me.SearchField) Then
Me.Recordset.FindFirst "[MyRecordID]='" & Me.SearchField & "'"
If Me.Recordset.NoMatch Then
MsgBox "No record found", vbOKOnly + vbInformation, "Sorry"
End If
End If
End Sub
If MyRecordID is defined as a Number:
Code:
Private Sub btnSearch_Click()
If Not IsNull(Me.SearchField) Then
Me.Recordset.FindFirst "[MyRecordID]=" & Me.SearchField
If Me.Recordset.NoMatch Then
MsgBox "No record found", vbOKOnly + vbInformation, "Sorry"
End If
End If
End Sub
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007