Hi
I'm opening a form using the following code
Private Sub btnAllbannsFiltered_Click()
DoCmd.Close
DoCmd.OpenForm FormName:="frm_BannsFiltered"
End Sub
[/CODE]
The form frm_BannsFiltered is based on a query which itself based on tempvars selected by the user so sometimes the query will have no results
The query is named qry_AllBannsFiltered
What I would like to do is to run the query to see if there are any records is not I would like it to open a message box saying "There are not results for this Search"
If there are results then open the form.
MY logic such as it is to to do this before the DoCmd Close using Else but my attempts seem to fail
Is my logic wrong?
thanks
Ian