By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,799 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,799 IT Pros & Developers. It's quick & easy.

Using a Check Box to make a Text Visible/Invisible

P: 4
I am trying to use a checkbox to make a textbox visible when checkbox=yes and invisible when the checkbox=no. I am not sure if this is the best way to go about this. It has been a while since I have used access and need some refreshing. All help is appreciated
May 21 '07 #1
Share this Question
Share on Google+
5 Replies

Rabbit
Expert Mod 10K+
P: 12,441
You can use the on click or after update event to set the textbox's visible property.
May 21 '07 #2

P: 19
I am trying to use a checkbox to make a textbox visible when checkbox=yes and invisible when the checkbox=no. I am not sure if this is the best way to go about this. It has been a while since I have used access and need some refreshing. All help is appreciated

the easiest way to do this would create some code for the after update event.

Expand|Select|Wrap|Line Numbers
  1. sub chkbox_afterupdate()
  2.  
  3. if me.checkbox then
  4.  me.textbox.visible= true
  5. else 
  6. me.textbox.visible=false
  7. end if
  8.  
  9. end sub
  10.  

hope this helps

CG
May 21 '07 #3

P: 4
Should this code go in the textbox after update or the checkbox? Thanks for your help.
May 22 '07 #4

missinglinq
Expert 2.5K+
P: 3,532
The checkbox AfterUpdate.
May 22 '07 #5

P: 4
Got it, works great. Thanks for the help.
May 22 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.