Add an (All) to a combobox used to filter a listbox, and other Qs

J

josh

Hi,

I'm sure this has been answered a billion times already, so sorry if
this is a repeat...

I found a few ways to filter a listbox based on a selection in a
combobox. Here is one solution:

http://www.mvps.org/access/forms/frm0028.htm

My question is a bit different:

I also want to have the first value available in the combobox be
something like "(All)" which will basically remove the filter that
limits what is selected in the listbox.

Q1: How do you add a value to the combo (like "All") if it's
recordsource is a query?

Q2: Should I hook up the AfterUpdate event of the combo to execute the
filtering as suggested in the mvps article mentioned above?

Background for Q3: This is a bit off course, but here it goes: What I
am building is form that will allow a user to select email addresses
(filtered by department) and add them to some sort of list (not sure
how the list will be implemented yet). These email addresses will be
used for an automated email notification when certain events occur.

I'm trying to architect a solution for holding these addresses. One
option is a normalized structure but that seems over-built. Another
option is to store the selected addresses in a memo field, but that
seems nasty.

Q3: Anyone have a better idea of how to accomplish the task at hand?

Thanks for your time,

Josh Blair
Evergreen, CO
 
J

joshblair

Hi, I have another question:

Q4 (continued from the post above): Is it possible to have one field
show up in the listbox but have the "Value" be a different field? For
example: show the "FullName" in the listbox but have the "EmailAddress"
be the "Value"?

Thanks again,

Josh Blair
Evergreen, CO
 
G

Guest

Q1: How do you add a value to the combo (like "All") if it's recordsource is
a query?
A1: In the cases where I have a table holding the data for the ComboBox or
ListBox I use query and not filter. I also have a record that has an
asterisk in the field for "All" to be pulled. When I use the box in a query
I have criteria like ---
Like [Forms]![MyForm]![MyBox]
If the "All" - asterisk is selected then all records are pulled.
 
J

joshblair

Karl,

That worked very well. I can't believe I didn't think of that.
Another pair of eyes or a fresh perspective really helps.

Thanks again,

Josh Blair
Evergreen, CO
 
J

joshblair

Please scrap Q3 on this thread, I'll ask it again in a more appropriate
forum.
Thanks for the help, Josh Blair
 

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