473,320 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Need help filtering records with combo boxes

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
Nov 12 '05 #1
2 3127
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" <lc*****@yahoo.com> wrote in message
news:4a*************************@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

Nov 12 '05 #2
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" <lc*****@yahoo.com> wrote in message
news:4a*************************@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
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dixie | last post by:
I have a form full of subforms which bring summary information onto the form from about 12 different tables. I am trying to get all of that summary information (mainly numbers) into 1 large table...
2
by: Sean | last post by:
Greetings all, I am attempting to make a form that will filter through several tables that (I believe) have refretial integrity. I am pulling data from several tables into the form and i would...
1
by: Monir | last post by:
Hi guys, I made a database with two tables ( tblsender, tblreceiver) with one to many relationship. tblsender has sender_Id (pk) sender_name, address, phone, email etc. tblreceiver has...
1
by: MLH | last post by:
I have a form (xxxxxxxxxxxxxx) with a combo-box control (yyyyyyyyyyyyyy). The rowsource property for that combo box is as follows: SELECT DISTINCTROW ., . FROM ; The SQL for qryVehicleList...
1
by: hackerslacker | last post by:
I have an ordering form that use two combo boxes to filter down the records of a Products table. This worked fine with the after_Update of the first filtering the records and creating the...
1
by: MLH | last post by:
I have a form with a subform control on it listing records returned by a saved query named UnbilledVehicles. I would like to put command buttons on the main form to apply dynamic filters to the...
1
by: cwby1966 | last post by:
I am truying to filter combo boxes from the results from a previous combo box. When you select a value in the first combo, the second one is then requeried. If there are no records for teh combo box,...
5
by: RHooper | last post by:
Hi, I'm new to Access, so I apologize if this question is trivial. I am trying to set-up a quick filter for users to define on a form bound to a table. I have a combo box called...
8
by: Michiel Rapati-Kekkonen | last post by:
Hi, I would like that my subform is immediately filtered as soon as one types a letter in an unbound searchbox in the form. If one types an 's' the content of the subform shows only records...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.