If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Cascading Queries
HI all,
I'm looking for some advice on what I think are cascading queries. Here's what I want to occur in my database: I have a main table (Partner Table) which has a field titled "Category". The "Category" field offers 4 options in a drop-down list. When the "Diversity" option is chosen from the "Category" list, I want another field (column) in the table to open and offer another drop-down list for more detailed choices (ie. African-American, Hispanic etc.). So, for example: I get to the "Category" field in my "Partner Table" and I choose "Diversity." A new column should appear that offers me options for which type of Diversity Group my entry is. Is this possible? I think I am trying to achieve either cascading quieries, parameters or updates. Is this right? If so, can someone give me some guidance? If not, in which direction should I be headed? I am a new, self-taught Access user and could use some advice!!! Thanks. |
#2
|
|||
|
|||
Cascading Queries
LA,
You could place the cboRace on the form, but disble or enable it according to the value of cboCategory. Use the AfterUpdate event of cboCategory... cboRace.Enabled = cboCategory = "Diversity" Also, place that same code in the OnCurrent event for the form. As you browse from record to record, cboRace will enable/disable accordingly. -- hth Al Campagna Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "l.a.spates" wrote in message ups.com... HI all, I'm looking for some advice on what I think are cascading queries. Here's what I want to occur in my database: I have a main table (Partner Table) which has a field titled "Category". The "Category" field offers 4 options in a drop-down list. When the "Diversity" option is chosen from the "Category" list, I want another field (column) in the table to open and offer another drop-down list for more detailed choices (ie. African-American, Hispanic etc.). So, for example: I get to the "Category" field in my "Partner Table" and I choose "Diversity." A new column should appear that offers me options for which type of Diversity Group my entry is. Is this possible? I think I am trying to achieve either cascading quieries, parameters or updates. Is this right? If so, can someone give me some guidance? If not, in which direction should I be headed? I am a new, self-taught Access user and could use some advice!!! Thanks. |
#3
|
|||
|
|||
Cascading Queries
You are describing Cascading Combos. The trick to doing this is by
manipulating the Row Source property of the combos. The first combo's row source will always be the same. The second row source should be filtered based on the value of the first combo so that it returns only rows that should be related to the first combo. In the After Update event of the first combo, requery the second combo. In some cases, it may be necessary to change the rowsource of the second combo. In that case, the requery is not necessary as it would be redundant. Resetting the row source property will cause a requery. "l.a.spates" wrote: HI all, I'm looking for some advice on what I think are cascading queries. Here's what I want to occur in my database: I have a main table (Partner Table) which has a field titled "Category". The "Category" field offers 4 options in a drop-down list. When the "Diversity" option is chosen from the "Category" list, I want another field (column) in the table to open and offer another drop-down list for more detailed choices (ie. African-American, Hispanic etc.). So, for example: I get to the "Category" field in my "Partner Table" and I choose "Diversity." A new column should appear that offers me options for which type of Diversity Group my entry is. Is this possible? I think I am trying to achieve either cascading quieries, parameters or updates. Is this right? If so, can someone give me some guidance? If not, in which direction should I be headed? I am a new, self-taught Access user and could use some advice!!! Thanks. |
Thread Tools | |
Display Modes | |
|
|