Hiding records in form

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

Guest

Hi,
I have a form that's bound to a table so when I open the form, it loads all
the records to navigte through. I have a Search button that I created using
the Command button wizard's find record. This works great except I don't
want all the records to show when I first open the form. Is there a way to do
this without having to write much coding? thanks in advance.
 
You can do this by replacing the table in the controlSource with a query.
The query needs to include criteria that refers to your search fields:
Where SomeField = Forms!YourFormName!YourSearchFieldName;
Since the search field will be empty when the form opens, no records will
show. This is much more efficient processing also, especially if your data
is stored in SQL Server or some other non-Jet database.
 
Back
Top