displaying search results form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the search results form based on the query. All is working fine if
there are some search results to display. But when there is no results to
display my search results form comes as a blank box withouth any labels or
text boxes. I would like to have the message box - No results found - to be
displayed instead of the form. How I can do this ? What If statement to use
which will display the results form or the message box ?

Thanks for help.

Tony
 
The Detail section of the form goes completely blank if there are no records
to display, and no new record can be added.

You may be able to show your message box by adding a text box to the Form
Header section (View menu), and setting its ControlSource to:
=IIf([Form].[RecordsetClone].[RecordCount]=0, "No records", Null)

However, Access is very buggy in how it displays these records as well, so
you might need to create an unattached label with the text you want in its
Caption, and set its Visible property programmatically.

More info on the display problem:
http://allenbrowne.com/bug-06.html
 
Back
Top