filtering help (1 Viewer)

reptar

Registered User.
Local time
Today, 10:06
Joined
Jul 4, 2005
Messages
32
Hi, i have a search form with unbound textfields which when filled out and form button is clicked, add to a string e.g. [first_name]='John' AND [last_name='Smith' etc. On a seperate form i have my qry_names as its control source. I would like to set this up so that when the 'search' button is clicked on the search form, it opens the form with the query, and applies the filter to it.

I need some help using the .Filter. I'm having trouble when using it because i am calling it under the click() of the button on the search form and need for it to some how carry across to the form with qry_names.

Thanks, any tutes available?
 

CyberLynx

Stuck On My Opinions
Local time
Today, 10:06
Joined
Jan 31, 2008
Messages
585
Assuming all your queries take into account all the Controls on form are bound to the same Field and those Fields are within each of your Queries:

Forms("MyFormName").RecordSource = "MyQueryName"
Forms("MyFormName").Filter = "YourFilterString"
Forms("MyFormName").FilterOn = True


If your other Form is a Sub-Form, well....that's a different matter

.
 
Last edited:

Users who are viewing this thread

Top Bottom