?
Solved

Hide / Unhide Fields

Posted on 2007-11-22
4
Medium Priority
?
175 Views
Last Modified: 2013-11-28
Hi All,

I have a checkbox named 'Check72'
When that is ticked I would like the following fields to be visible:

Label63, Label67, Lable71, txtMinor1, txtMinor2, txtMinor3, txtModerate1, txtModerate2, txtModerate3, txtMajor1, txtMajor2, txtMajor3, Text36, Text38 and Text39

Does anyone know how i'd make this possible?
Many Thanks,

Pete
0
Comment
Question by:PeterHing
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 48

Accepted Solution

by:
jpaulino earned 400 total points
ID: 20334026
You can do

If Check72.Value = 0 Then
 ' hide fields like Label63.Visible = False
Else
 ' show fields like Label63.Visible = True
End If
0
 
LVL 46

Assisted Solution

by:tbsgadi
tbsgadi earned 400 total points
ID: 20334082
Hi PeterHing,

Label63.visible=Check72
Label67.visible=Check72
etc

Good Luck!

Gary
0
 
LVL 34

Assisted Solution

by:jefftwilley
jefftwilley earned 100 total points
ID: 20334497
tbsgadi has the right idea.

Create a public sub in your form's code module and put all the labels there as Gary has stated.

Public Sub UpdateLabels()

Label63.visible=Check72
Label67.visible=Check72
etc..
end sub


Then in the after update event of your checkbox, put a call to the UpdateLabels code

Private Sub MyCheckAfter_Update()
call UpdateLabels
end sub

Then you also want to put that same call in your form_Open event.

That way, you keep from having to do the same code twice.

Luck!
J
0
 
LVL 13

Assisted Solution

by:wiswalld
wiswalld earned 100 total points
ID: 20334868
If Me.Check72 = True Then
Me.Label67.visible = True
Me.Label63.Visible = True
Etc
Else
Me.Label63.Visible = False
Etc.
End If
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question