换个思路,在组合框2的Enter事件设置代码:
If e.form.Controls("组合框1").Text = "A" Then e.Sender.ReadOnly = BooleanEnum.TrueElse e.Sender.ReadOnly = BooleanEnum.FalseEnd If