Solved

Hide / Unhide Fields

Posted on 2007-11-22
4
168 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now