Connecting Tech Pros Worldwide Forums | Help | Site Map

Need help filtering records with combo boxes

Luther
Guest
 
Posts: n/a
#1: Nov 12 '05
I want to create a form that searches a table. The hard part is this,
I'd like to have the available records filtered based on combobox
selections. For example, if this were a vehicle database, I might want
to filter by AutomobileType, Year, Make, Model, Color. In this case it
would work like this:

First all of the records are available, that is, every kind of auto.
So I select from my AutomobileType combobox "2003". Now I only have
records available for autos made in 2003. I filter more by selecting
"Dodge". Now only Dodge vehicles made in 2003 are available.
Continuing with this process, I select "Caravan" and "Red". Now only
Red Dodge Caravans made in 2003 are available.

My actual application is a little different, but this paints my
situation exactly. How can I use comboboxes to filter a form in this
way? I'm familiar with VBA if that helps.

Thanks in advance.

- Luther

Douglas J. Steele
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Need help filtering records with combo boxes


http://www.mvps.org/access/forms/frm0028.htm at "The Access Web" shows one
way of doing this.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)



"Luther" <lcifers@yahoo.com> wrote in message
news:4a243c25.0310281421.ae17a47@posting.google.co m...[color=blue]
> I want to create a form that searches a table. The hard part is this,
> I'd like to have the available records filtered based on combobox
> selections. For example, if this were a vehicle database, I might want
> to filter by AutomobileType, Year, Make, Model, Color. In this case it
> would work like this:
>
> First all of the records are available, that is, every kind of auto.
> So I select from my AutomobileType combobox "2003". Now I only have
> records available for autos made in 2003. I filter more by selecting
> "Dodge". Now only Dodge vehicles made in 2003 are available.
> Continuing with this process, I select "Caravan" and "Red". Now only
> Red Dodge Caravans made in 2003 are available.
>
> My actual application is a little different, but this paints my
> situation exactly. How can I use comboboxes to filter a form in this
> way? I'm familiar with VBA if that helps.
>
> Thanks in advance.
>
> - Luther[/color]


Tom Wickerath
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Need help filtering records with combo boxes


Hi Luther,

Scott Barker offers an example, using a movie database, in his Power Programming
series of books. I'd recommend buying a copy of his book and then take a look
at the sample database, which I believe is named chap08.mdb (I don't have a copy
handy at the moment). This filter by form sample is one of the few that I have
seen that includes "real-time" filtering as you described. Look for "Access
2002 Power Programming" (or whichever version you are using) at your favorite
bookstore. I think it would be a bit much to try to cover the "how-to" in a
newsgroup reply.

Tom
__________________________________

"Luther" <lcifers@yahoo.com> wrote in message
news:4a243c25.0310281421.ae17a47@posting.google.co m...
I want to create a form that searches a table. The hard part is this,
I'd like to have the available records filtered based on combobox
selections. For example, if this were a vehicle database, I might want
to filter by AutomobileType, Year, Make, Model, Color. In this case it
would work like this:

First all of the records are available, that is, every kind of auto.
So I select from my AutomobileType combobox "2003". Now I only have
records available for autos made in 2003. I filter more by selecting
"Dodge". Now only Dodge vehicles made in 2003 are available.
Continuing with this process, I select "Caravan" and "Red". Now only
Red Dodge Caravans made in 2003 are available.

My actual application is a little different, but this paints my
situation exactly. How can I use comboboxes to filter a form in this
way? I'm familiar with VBA if that helps.

Thanks in advance.

- Luther


Closed Thread