Try this: Make sure that "Limit to List" is not selected your combo
box so that you can key in anything. When you link to this combo box
in your query or recordset or whatever, filter the link through "like"
and add "*" on both sides in your WHERE clause.
Example:
Instead of [forms]![main form]![cmbName] use:
like ("*" & [forms]![main form]![cmbName] & "*")
This also works with values that your query asks for. Surround the
value you are asking for by "*" and it will select all records if you
leave it blank!
If the source combo box is blank, you will get everything. If you have
part of a name in it, it will select every record with that name. One
bad thing, though: It it will also select partials with that name.
For example, "Smithfield" will be selected even if you select "Smith"
Hummm. I don't know how to get around that one. Depends on what you
are trying to do with the recordset.
Good luck!
Alex.
Andy wrote:
Thanks for your reply.
In fact, I have numerous ComboBoxes and it would be useful to use
wildcards in any of them, so I dont really want to double them up. Any other
ideas ?? ;-)
Andy
"Deborah V. Gardner" <dg******@twcny.rr.com> wrote in message
news:42***************@twcny.rr.com... Andy
How about have two combo boxes? The first lists only one instance
of each last
name. When you choose one, the second combo box will list all the
names with
just the same last name as the one selected in combo box 1.
Deborah
Andy wrote:
I have a form with several ComboBoxes. One of these is Surname,
can I make
it select all the Smiths for example by using wildcards? At the
moment my query only picks up the individual Surname selected.
Perhaps I need to re-work my form, but any ideas would be
welcomed.
Andy