vba - Forms: How to implement a conditional tab-keystroke between 2 controls -


i have 2 controls (control1, control2; combo boxes) second combo box conditional on value contained in first one.

the rules set of given values in control1; control2 not enabled. set of other values in control1; control2 enabled.

i trying implement behaviour: focus on control1, when user pressing tab evaluate if control2 must enabled or disabled, if control2 enabled gets focus, if control2 not enabled, control3 gets focus.

i've attempted use various events on control1 , control2 seems miss beat... using control1_exit don't seem able prevent jumping control3 if control2 should enabled (i've tried force focus control2 cursor lands on control3 anyway, seems when exit triggered cursor in transit control3).

i scratching head problem few hours though should simple one, , searching se or web not seem lead solution... appreciated.

thanks in advance chris

i suggest set control2.enabled in on change event of control1. plus on form_current, set correctly existing data.

then set tab order control2 after control1, , don't need code focus or exit. if control2 enabled, receives focus on tab, if not won't.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -