Greying out controls

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
 
D

Dirk Goldgar

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
 

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

Similar Threads

Greying Out Controls 2
Greying Out Null Checkboxes 2
Greying out options 2
Greying out fields 6
'Greying out' cusome menu items 1
Greying out text 2
Form greyed out unless ... 9
Question on Enable Feature 3

Top