Solved

Hiding a subform with a multiple column listbox

Posted on 2008-09-30
6
354 Views
Last Modified: 2013-11-28
I want to hide my subform based on the choice in a multiple column list box.

My list box has two headings Name and Number
based on the name selected i want to use a select case statement to hide or unhide the subform.
0
Comment
Question by:atreidies
  • 3
  • 3
6 Comments
 
LVL 30

Expert Comment

by:hnasr
ID: 22606937
If the control that contains the subform is calld x, then in the listbox after update hide/unhide the control

    Me!x.Visible = False
0
 
LVL 1

Author Comment

by:atreidies
ID: 22607042
I know the statement to hide it, what i dont know is how to make that happen based on which record is selected. I mean to use a select statment to hide or unhide it.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 22607087
<I mean to use a select statment to hide or unhide it.>
Can you explain more?
A select statement won't hide the control!
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Author Comment

by:atreidies
ID: 22607255
my list box has 2 columns
what I want to do is add a select case statment to the after update of the list box. that will hide the subform. My issue is the the list box has 2 columns how do i attach the select case to one of those headings.
eg.
select case (record selected)
case Todd
   hide subform
case Mike
   hide subform
end select
0
 
LVL 30

Expert Comment

by:hnasr
ID: 22607415
Private Sub lstBox_AfterUpdate()
    Select Case lstBox.Column(0)
        Case Is = "Todd"
            Me!frmY.Visible = False
        Case Is = "Mike"
            Me!frmY.Visible = True
        End Select      
End Sub
0
 
LVL 1

Accepted Solution

by:
atreidies earned 0 total points
ID: 22614228
Ive tried a few variations of this:

Private Sub List6_AfterUpdate()
Select Case List6.Column(0)
    Case Is = "0164"
    Me!EmploymentTypeDescriptionssubform.Visible = False
End Select
End Sub

Without success and took a different route....but thanks for the help.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

15 Experts available now in Live!

Get 1:1 Help Now