A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Greying out controls



 
 
Thread Tools Display Modes
  #1  
Old January 5th, 2010, 04:45 PM posted to microsoft.public.access.forms
Jen
external usenet poster
 
Posts: 544
Default Greying out controls

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

  #2  
Old January 5th, 2010, 05:16 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Greying out controls

"Jen" wrote in message
news
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



--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.