Using Multiple Combo Boxes to Retrieve (not edit) Records from a Table

piggitypow

Registered User.
Local time
Today, 03:18
Joined
Mar 19, 2005
Messages
19
I'm creating a form that has combo boxes pertaining to each of the following fields from table "Documents": DocumentID (primary key), DocumentTitle, DocumentAuthor, and DocumentYear. No combo box is used with any priority over the others. The working form will allow a user to retrieve the full document record (data for all fields) by using any combo box they want, as well as any combination of combo boxes. This means that if a selection is made in one field's combo box, the drop-down lists in the other boxes need to update based on that preliminary selection. The filtered results for each field, based on any and all combo box selections, are always shown in a single datasheet on the form.

The kicker is that when a user starts filtering records by making selections from the drop down list in a combo box, but then decides to TYPE in another field's combo box, I want the combo box they typed in to do two things: 1) filter the records for that field based on what they typed, if any records meet that criteria (e.g. they typed "B" so only records beginning with B are shown), and 2) if no records match the typed criteria, the search starts all over (at the top of the cascade), filtering all library records based only on what they typed in the most recent combo box.

Does that make sense? Any tips welcomed.

I don't know how to cascade combo boxes in this way.
 
Combos are typically cascaded from most general to most specific. So A filters B and B filters C and C filters D. If your dependencies are not hierarchial, you'll need to create the rowsource for the combo you want to filter dynamically with VBA.
 
piggitypow said:
I'm creating a form that has combo boxes pertaining to each of the following fields from table "Documents": DocumentID (primary key), DocumentTitle, DocumentAuthor, and DocumentYear. No combo box is used with any priority over the others. The working form will allow a user to retrieve the full document record (data for all fields) by using any combo box they want, as well as any combination of combo boxes. This means that if a selection is made in one field's combo box, the drop-down lists in the other boxes need to update based on that preliminary selection. The filtered results for each field, based on any and all combo box selections, are always shown in a single datasheet on the form.

The kicker is that when a user starts filtering records by making selections from the drop down list in a combo box, but then decides to TYPE in another field's combo box, I want the combo box they typed in to do two things: 1) filter the records for that field based on what they typed, if any records meet that criteria (e.g. they typed "B" so only records beginning with B are shown), and 2) if no records match the typed criteria, the search starts all over (at the top of the cascade), filtering all library records based only on what they typed in the most recent combo box.

Does that make sense? Any tips welcomed.

I don't know how to cascade combo boxes in this way.
I am doing the same for as you. The first part is the most interesting part for me. Some quick background info: 4 fields (companyID, SUBsidiary, Type, value). Three comboboxes (companyID, SUBsidiary, Type) To be used indepentdant from eachother, updating the other comboboxes after doing a change. I do not have a primary key in the table and I want to present the total value of the selection and after that, put it in a Graph (for this I created a make table query and based the graph on that table).

I am going through the threads here, but can not find this combination. Tried by doing a query, linked to all comboboxes, but that did not work. the query did not group every single field, but looked at all three fields so I got double values in my combobox.

Can you give me a hand here? I will look further in the mean time.

Thanks ,

Fever
 

Users who are viewing this thread

Back
Top Bottom