Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need advise on which event to use.

Status
Not open for further replies.

Pack10

Programmer
Feb 3, 2010
495
US
I have 3 check boxes with 3 text boxes -- when the user clicks the checkbox, today's date gets stored to the text box.
(They are answering questions?)
When the user has selected all three checkboxes, I want to gray out the text box and checkbox. Kind of "lock it down".
But I get "You can't disable a control while it has focus" when I am on the last checkbox (which does make sense) . Where else can i place this code.?

thx
 
I'd do it on the click event of each check box since the user could possibly finish on any given check box. You would need to put something along the line of:


Sub SomeCheckBox1_Click()

If (SomeCheckBox1=True and SomeCheckBox2=True and and SomeCheckBox3=True) then

'move the focus off of the controls I want to play with
me!SomeOtherControlLikeAnExitButton.setfocus



'code to disable whatever
SomeCheckBox1.enable=false
'etc


Endif


End sub

in the Click event

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top