Filter by Form limitations

A

Angela

I have a form with several combo boxes which are "limit to list". I have
another combo box that is disabled if the value in another field doesn't meet
certain criteria. When the user clicks "filter by form", they can't enter
any wildcard strings into the "limit to list" combo boxes, and they can't use
the disabled field at all for filtering.

I would like the form to become more usable for filtering when the user
clicks "filter by form" (ability to use wildcards etc). What is the best way
to do this? I had a thought that I could put a procedure in the ApplyFilter
event that checks to see if the filter being used is 'filter by form', and
then changes these combo boxes so that they are more usable (enable them and
set LimitToList to false). I don't want the fields to be accidentally left
in this state, however.

Has anyone tried this or is there a more straightforward way to accomplish it?

Thanks
Angela
 
A

Allen Browne

Angela, I think you have outgrown Filter By Form. It has several
limitations, and doesn't work in Runtime Access at all.

You might be ready to take the plunge and provide a more obvious filtering
mechanism for your users.

This one lets you filter on any one field as you type:
Find as you type - Filter forms with each keystroke
at:
http://allenbrowne.com/AppFindAsUType.html
It is very easy to set up: copy'n'paste, no coding to write.

This one is more powerful (filtering on a combination of fields), and it's
the one I generally implement for users, but it does require some coding.
It's worth learning, as you reuse this concept for offering lots of filters
for your reports as well. It contains a sample database that shows how it's
done:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
 
A

Angela

Allen,
I completely forgot that Filter by Form doesn't work in Runtime. It's been
a while since I did this work (last time was using Access 97) and I'm a bit
rusty. Thanks for your help and the links.

Angela
 
E

Earl Anderson

Allen,

Does the function provide for any 'wildcard' character(s)? For instance,
using the example on your site, if the user recalled that an 'Address' had
the letters 'vico' in it, but did not recall the exact name of the street,
would typing " *-v-i-c-o-* " produce "Via Ludovico il Moro 22" as an
address?

Thx...
Earl Anderson
 
A

Allen Browne

Use the Like operator with wildcards, e.g.:

strWhere = strWhere & "(Address Like ""*" & SomeTextbox & "*"") AND "
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top