L
Lee
I cut and pasted the controls from a form to a tab control
(on the same form). Now I'm having problems with the
conditional formatting that was working before. In code,
the click event for a checkbox, if it is true I set the
following:
ControlName.FormatConditions(0).Enabled = True
ControlName.SetFocus
Where ControlName is a textbox that I want to enable for
user entry. The error is on the SetFocus. When I check
the ControlName.FormatConditions(0).Enabled it returns
False. I then try to perform the
ControlName.FormatConditions(0).Enabled = True statement
again and now it returns true and the SetFocus works while
I'm stepping thru the code. I've tried DoEvents between
the two statements to no avail. I put a loop for 5-10
seconds between statements and that didn't work either.
Anybody got and idea as to what's going on here?
Thanks in advance!
(on the same form). Now I'm having problems with the
conditional formatting that was working before. In code,
the click event for a checkbox, if it is true I set the
following:
ControlName.FormatConditions(0).Enabled = True
ControlName.SetFocus
Where ControlName is a textbox that I want to enable for
user entry. The error is on the SetFocus. When I check
the ControlName.FormatConditions(0).Enabled it returns
False. I then try to perform the
ControlName.FormatConditions(0).Enabled = True statement
again and now it returns true and the SetFocus works while
I'm stepping thru the code. I've tried DoEvents between
the two statements to no avail. I put a loop for 5-10
seconds between statements and that didn't work either.
Anybody got and idea as to what's going on here?
Thanks in advance!