Connecting Tech Pros Worldwide Help | Site Map

How can I block a textbox if option box is selected?

Newbie
 
Join Date: Aug 2009
Posts: 8
#1: Aug 13 '09
Hi , I'm making a useform and I want people to say if they are single cheking an option box, and if they're not single i need them to write their wife name. I already have the 2 option boxes (to choose between single and married) and the textbox (to write their wife's name). The real problem is that i need the textbox and to be blocked if they select single. I need it to be blocked an in another color. If it hides with the label when i click single it's also ok. Thank you very much
Familiar Sight
 
Join Date: Oct 2007
Posts: 158
#2: Aug 15 '09

re: How can I block a textbox if option box is selected?


if optSingle.value then
textbox1.enabled = false
textbox1.backcolor = vbred
else
textbox1.enabled = true
textbox1.backcolor = vbwhite
endif
regards
manpreet singh dhillon hoshiarpur
CyberSoftHari's Avatar
Expert
 
Join Date: Sep 2007
Location: Banglore, India.
Posts: 450
#3: Aug 17 '09

re: How can I block a textbox if option box is selected?


just simplifying above code.
Expand|Select|Wrap|Line Numbers
  1. 'in option click event.
  2. textboxname.enabled = optionname.value 
Reply