Search form with subform for search results retrieves all records when opend

  • Thread starter Thread starter rhizopus
  • Start date Start date
R

rhizopus

Guest
I have a search form that contains unbound text boxes as parameters for for a search with a subform that displays the search results. The query is attached to the subform and uses "Like" and "*" to make the search more user friendly. When the form is opened the subform executes the search based on the blank text boxes and retrieves all of the records from the database... 14,000 records. I have attempted to limit the query to 100 records but that does not seem to effect it. I have a button for "requery" when the user enters parameters. Is there any way I can stop this query from running when the form is opened? I can not find any events that are applicable.
 
If you have used the unbound controls to create a filter for the recordsource on the subform, you could have a dummy filter which applies itself to the subform when the mainform opens.

The filter would be valid but no records could exist, so the subform would remain blank until the real filter was applied later.

Does this make sense?

Dave E
 

Users who are viewing this thread

Back
Top Bottom