Is the requested record already somewhere visible in the form? So if you use the record navigation buttons to browse manually through the records, do you actually find the record you search in the form? If not, my code will indeed not work.
Below an alternative solution. If no record is found, the main recordset is retrieved. You'll have to declare a public variable on top of the code and to add a line in the "form_open"-sub
Public strOriginalSQL as String
Private Sub Form_Load
strOriginalSQL = Me.RecordSource
Private Sub cmdSearchButton_1_Click()
Dim rs As Recordset
Dim strSQL As String
'do not forget to replace table by the name of the table or view you use.
strSQL = "select * from [table] where [UniqueAEVRef]='" & Me.Searchfield1 & "'"
Set rs = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)
If Not rs.BOF And Not rs.EOF Then
Set Me.Recordset = rs
MsgBox "No record found", vbOKOnly + vbInformation, "Sorry"
Me.RecordSource = strOriginalSQL
Me.Searchfield1 = Null