Greying out controls

  • Thread starter Thread starter Jen
  • Start date Start date
J

Jen

Hi Guys,
I'm trying to grey out a control on a form when a check is put in a
checkbox. I know there's been a couple of similar threads already and i've
actually got the control to become greyed out but when i open the form again
later, the control is no longer greyed out even though the checkmark is still
in the box.

Anybody know what i'm doing wrong ?. Any help would be great.

Thanks,
Jen

Ps...Apologies if this is a double post but the previous one doesn't seem to
have worked
 
Jen said:
Hi Guys,
I'm trying to grey out a control on a form when a check is put in a
checkbox. I know there's been a couple of similar threads already and i've
actually got the control to become greyed out but when i open the form
again
later, the control is no longer greyed out even though the checkmark is
still
in the box.

Anybody know what i'm doing wrong ?. Any help would be great.

Thanks,
Jen

Ps...Apologies if this is a double post but the previous one doesn't seem
to
have worked


I see your earlier message.

You probably need to use the form's Current event to apply whatever logic
greys out the control, as well as using the check box's AfterUpdate event.
For example,

Private Sub chkYourCheckbox_AfterUpdate()

Me.YourOtherControl.Enabled = Not Me.chkYourCheckbox

End Sub

Private Sub Form_Current()

Me.YourOtherControl.Enabled = Not Me.chkYourCheckbox

End Sub
 
Back
Top