synchronized Combo Boxes in subforms

R

rodney24

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?
 
A

Al Campagna

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!cboNumber1

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."
 
R

rodney24

Awesome, works great now..thanks Al
Rodney


Al Campagna said:
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!cboNumber1

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."




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top