Set Focus to Subform ctl that match combobox selection main form

  • Thread starter Graysen via AccessMonster.com
  • Start date
G

Graysen via AccessMonster.com

i have a combo box on my main form. i want to choose a name from the combox
and have the control/name selected by setfocus in the subform.

here's my code. right now it just goes to the first record in the subform.
it doesn't match the combox name.

the name of the combox = name
Once I select a name, I click on a goto button and behind the button is this
code.....

With Forms![frmMain].[qryCost_subform]
.setfocus
.form![id.code].setfocus


the id.code is the code associated with the name on the combobox.
I get '"object doesn't support his" or if I use ![qyCost_subform] it errors
with "can't find subform"

thanks for your help


Graysen
 

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