conditional disable of textbox

  • Thread starter pclis007 via AccessMonster.com
  • Start date
P

pclis007 via AccessMonster.com

I have a dropdown that lets the user pick their marital status. one of the
next textboxes wants the user to enter the divorce date etc. If the user
selects marital status of married or single, I want the other textbox to grey
out, disabled and inaccessible by the user. Is there some code that would
simplify this? Probably something in the general form properties that would
grey out both the textbox and the label with it?

Thanks
 
J

June7 via AccessMonster.com

Use AfterUpdate event of the combobox. Select the combobox and open
Properties sheet/Events tab, set AfterUpdate to [Event Procedure]. Suggest
set the date box Enable property to No then use code to enable it only if
divorce selected in combobox. That way users can't accidentally get into when
shouldn't. If the label is still associated with the box then it will also
fade out.
 
J

June7 via AccessMonster.com

Use AfterUpdate event of the combobox. Select the combobox and open
Properties sheet/Events tab, set AfterUpdate to [Event Procedure]. Suggest
set the date box Enable property to No then use code to enable it only if
divorce selected in combobox. That way users can't accidentally get into when
shouldn't. If the label is associated with the box then it will also fade
out.
 
S

Scott McDaniel

Use AfterUpdate event of the combobox. Select the combobox and open
Properties sheet/Events tab, set AfterUpdate to [Event Procedure]. Suggest
set the date box Enable property to No then use code to enable it only if
divorce selected in combobox. That way users can't accidentally get into when
shouldn't. If the label is still associated with the box then it will also
fade out.

You would also need to make sure to re-enable this in the Form's
Current event:

Sub Form_Current()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top