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
|
|||
|
|||
Continuous Forms from Cascading Combo Boxes
I have a form with 2 cascading combo boxes in the form header. The first is
to select the year & the next to select the version. The source of the Year & Version is the same query from which I need the data to be shown in the detail section of the form TSL Number ABC 5000 BCD 3000 Etc I have a query ‘Data Query’. It has the fields: Year, Version, TSL, Value Eg Year Version TSL Value 2008 1 ABC 99 2008 1 BCD 50 2008 2 ABC 75 2008 2 BCD 60 2009 1 ABC 87 2009 1 BCD 45 etc I want to set up a continuous form with 2 Cascading combo boxes (I’m OK with the cascading bit) from which I can select Year & Version, & then have the corresponding TSL & Value list show in the Detail area. I know I need to set requery’s on the ‘Onload’ & ‘AfterUpdate’ events for the appropriate boxes, but I can’t even get the form to only show the data I want at the moment. In the text boxes in the Detail section, what do I need to use as the control source? I’ve seen the posts where it says to add the data to the Combo boxes & then use field 2 etc, but if I do that, instead of a nice 2008, 2009 list, I get them repeated several hundred times. Thanks |
#2
|
|||
|
|||
Continuous Forms from Cascading Combo Boxes
Have a look at the cascading list boxes at:
http://www.accessmvp.com/Arvin/Combo.zip You need to use the same type of thinking in your queries, so that the subform recordsource is based on the query which produces the result you are looking for. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Esmerelda" wrote in message ... I have a form with 2 cascading combo boxes in the form header. The first is to select the year & the next to select the version. The source of the Year & Version is the same query from which I need the data to be shown in the detail section of the form TSL Number ABC 5000 BCD 3000 Etc I have a query 'Data Query'. It has the fields: Year, Version, TSL, Value Eg Year Version TSL Value 2008 1 ABC 99 2008 1 BCD 50 2008 2 ABC 75 2008 2 BCD 60 2009 1 ABC 87 2009 1 BCD 45 etc I want to set up a continuous form with 2 Cascading combo boxes (I'm OK with the cascading bit) from which I can select Year & Version, & then have the corresponding TSL & Value list show in the Detail area. I know I need to set requery's on the 'Onload' & 'AfterUpdate' events for the appropriate boxes, but I can't even get the form to only show the data I want at the moment. In the text boxes in the Detail section, what do I need to use as the control source? I've seen the posts where it says to add the data to the Combo boxes & then use field 2 etc, but if I do that, instead of a nice 2008, 2009 list, I get them repeated several hundred times. Thanks |
Thread Tools | |
Display Modes | |
|
|