Solved

Hide / Unhide Fields

Posted on 2007-11-22
4
172 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 100 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 100 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 25 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 25 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

752 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