We help IT Professionals succeed at work.

Combo Box dependent on another combo box in a subform

Dozingquinn
Dozingquinn asked
on
809 Views
Last Modified: 2013-11-28
Hello,

I have a main form [frm_leads] that has a combobox [cboVoidlead]. This combo box has two values 'yes' and 'no'.

I have a subform [sFrm_leaddetails] that has a combobox [cboLeadoutcome]. Among other values, this combo box has (among other values) the value 'Void'.

I would like to make the value of [cboVoidlead] display 'yes', if the value selected in [cboLeadoutcome] is 'Void'.

Could you please show me how to do this?
Comment
Watch Question

assuming your subform CONTAINER on your parent form is also called sFrm_leaddetails. Me is the access reserved keyword for the current form, use as is.

if me.sFrm_leaddetails.form.cboLeadoutcome = "yes" then
me.cboVoidlead = "YES"
else
me.cboVoidlead = "NO"
end if
Scott McDaniel (EE MVE )Infotrakker Software
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
i didnt read the question properly. go with lsm

Author

Commented:
Thanks LSM,

Yes your assumptions were correct. This is in a form. Your solution worked - just need to tinker it slightly.

Is there a way to alter the code so that if the user changes their selection from "void" (in cboLeadoutcome) , the value in cboVoidlead would change back to "No"?
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.