04-15-11, 11:16 #1Registered User
- Join Date
- Apr 2011
Unanswered: Hiding Labels, boxes, and conrtols with a checkbox
It's been a while since I've messed with Access 07. But I'm trying to edit a form so that a box, a label, and a few bound text boxes and their associated labels are either hidden or visible based on whether or not a checkbox is checked or not. This is what I have for the VB Code
If CheckHide = False Then
Box34.Visible = False
Label35.Visible = False
REDEP_POC_NAME.Visible = False
REDEP_POC_ADDRESS.Visible = False
REDEP_POC_PHONE.Visible = False
Box34.Visible = True
Label35.Visible = True
REDEP_POC_NAME.Visible = True
REDEP_POC_ADDRESS.Visible = True
REDEP_POC_PHONE.Visible = True
Basically I had the label, box and three text boxes hidden by default and was hoping that this code would make then hidden or visible based on whether the checkbox (CheckHide) was checked or not. However, it's not working.
Any advice? Am I completely off?
04-15-11, 11:54 #2Moderator
Provided Answers: 19
- Join Date
- Jun 2005
- Richmond, Virginia USA
You have it set up so that if CheckHide is ticked the controls will be visible. Is that really your intention? It sounds reversed, given the name CheckHide. One would think it should be if CheckHide is ticked, the controls should be hidden.
Linq ;0)>Hope this helps!
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007