Filter subform in unbound form!

itchy

Utterly confused since...
Local time
Today, 15:37
Joined
Jan 25, 2001
Messages
31
Hello all,
I have a little bit of a dilemma. I have an unbound form which servers as a search page for the entire database. There are a bunch of checkboxes for the user to select which area of the database to search (basically which table). Once a checkbox is selected, this triggers three unbound textboxes (for entering search criteria), three corresponding combo boxes that have been automatically populated with the field names of the chosen table (for selecting the field in which to search for the data), a subform that displays the un-filtered table (the subform is actually based on a query without any filter criteria set), and a 'Go' and 'Reset' button. The thought is that the user can enter criteria to search in any given field and click the 'Go' button and the subform automatically filters as per their given info. The problem I am having is how do I set a filter on a subform/query? Would it be better to create the subform/query on the fly based on whatever the user enters? If so, I'm going to need alot of help with it!

Thanks!

Itchy
 
Thanks for the article, but here is a question that is not addressed. It seems that the function creates a query on the fly but before doing so, deletes any existing query. My database is in a multiuser environment, so what happens if two people try to run queries at approximately the same time? If the first person runs a query and while they are viewing the results on screen another person tries to run a query, the query of the first person gets deleted? What if the first person then tries to print a report based on their query? The query might be gone? Is this correct?

Itchy
 

Users who are viewing this thread

Back
Top Bottom