how about this instead (i know this looks long but it is not hard):
is the user launching this process by like clicking a button? this would be cooler: instead of having the form opening blank with something in it that says there are no records, you just pop up a message box that says "No Records Match!".
some questions: are the search results displayed in the form? or is the form just telling you how many records there are? how is the form being opened? is the user just opening the query from the database window, or is it being opened via a button? is the query the recordsource for the form?
Also, another idea would be instead of prompting the user for their search string, have a place in a form for them to type it: this way, say they search on "BLOODHOUND" and it doesnt get any matches, they can easily change it to "HOUND".
make a form called frmSearch.
put on a text box called txtSearch.
put on a button called btnSearch. cancel the wizard when it comes up.
in the button's OnClick property:
Code:
Private Sub btnSearch_Click()
Dim strSearch, strWhere
strSearch = Me.txtSearch
'concoct a WHERE clause based on user input
strWhere = "[FieldName] like '*" & strSearch & "*'"
'If no records in the data table match, pop up a message and quit the subroutine
If DCount("ID", "TableName", strWhere) = 0 Then
MsgBox "There are no records!", vbOkOnly
Exit Sub
Else 'There is a match, so open the resulting data records
DoCmd.OpenForm "FormName", acNormal, , strWhere
End If
End Sub
so the user can type in what they are looking for in the text box on the frmSearch, then hit a button.
you have to substitute: your table name for TableName, an ID field name from your table for ID, and the data field you are searching in for FieldName. also, at the end, my "FormName" will be a form whose record source is merely your data table, with whatever data you want displayed for the records that get returned. you can set it's properties to 'datasheet' so it looks like a table or query.
hope this gives you an idea of the choices you have.
g