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
|
|||
|
|||
synchronized Combo Boxes in subforms
Synchronized Combo Boxes in Subforms
I am using MS Access 2003 and have created a form using two combo boxes where I select the state from the first combo box. The second combo box is controlled by a query that looks at the first combo box so that when you change the state name in the first combo box it requires and then lists the available counties in the second combo box. This works very well but when I place this form as a subform and link the master and child fields the form finds several records which is right. But when I try to change the state name on one of the records in the in the first combo box in the subform and then pick the second combo box for the updated county list it does not find the correct state and wants me to enter the parameter value. I think that because I have it require the list of available counties that it looses track of the record that I changed in the subform. Is there something I can do so that works right in the subform? |
#2
|
|||
|
|||
synchronized Combo Boxes in subforms
rodney24,
When your form was a single form, your cboNumber2 combo referred to the value in... =Forms!frmYourFormName!cboNumber1 When this form becomes a subform, cboNumber2 should refer the value in... =Forms!frmMainFormName!frmSubformName.Form!cboNumb er1 Don't forget to requery cboNumber2 after selecting a cboNumber1 value. -- hth Al Campagna Microsoft Access MVP 2007-2009 http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "rodney24" wrote in message ... Synchronized Combo Boxes in Subforms I am using MS Access 2003 and have created a form using two combo boxes where I select the state from the first combo box. The second combo box is controlled by a query that looks at the first combo box so that when you change the state name in the first combo box it requires and then lists the available counties in the second combo box. This works very well but when I place this form as a subform and link the master and child fields the form finds several records which is right. But when I try to change the state name on one of the records in the in the first combo box in the subform and then pick the second combo box for the updated county list it does not find the correct state and wants me to enter the parameter value. I think that because I have it require the list of available counties that it looses track of the record that I changed in the subform. Is there something I can do so that works right in the subform? |
#3
|
|||
|
|||
synchronized Combo Boxes in subforms
Awesome, works great now..thanks Al
Rodney "Al Campagna" wrote: rodney24, When your form was a single form, your cboNumber2 combo referred to the value in... =Forms!frmYourFormName!cboNumber1 When this form becomes a subform, cboNumber2 should refer the value in... =Forms!frmMainFormName!frmSubformName.Form!cboNumb er1 Don't forget to requery cboNumber2 after selecting a cboNumber1 value. -- hth Al Campagna Microsoft Access MVP 2007-2009 http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "rodney24" wrote in message ... Synchronized Combo Boxes in Subforms I am using MS Access 2003 and have created a form using two combo boxes where I select the state from the first combo box. The second combo box is controlled by a query that looks at the first combo box so that when you change the state name in the first combo box it requires and then lists the available counties in the second combo box. This works very well but when I place this form as a subform and link the master and child fields the form finds several records which is right. But when I try to change the state name on one of the records in the in the first combo box in the subform and then pick the second combo box for the updated county list it does not find the correct state and wants me to enter the parameter value. I think that because I have it require the list of available counties that it looses track of the record that I changed in the subform. Is there something I can do so that works right in the subform? . |
Thread Tools | |
Display Modes | |
|
|