Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Checkbox Other Field Visible
Dan Jackson 
            
4 years ago
Update: This is the issue where updating a field on a continuous form affects all records

Hi all,

I have a check box which i want to reveal some fields when checked.
I have the below code on the Forms On_Load event (Will copy to the CB After Update when working).

The invisible part works but not not the visible. i.e. ALL fields are invisible, regardless of whether the checkbox is ticked or not.

Can rule out typos since all fields go invisible and the bottom half is C&P of the top half.
Debugger shows no errors

Many Thanks

'   <<<<< Tick LOA In To Reveal LOA Related Fields >>>>>
    If Check_LOAIn Then
'       <<<<< LOA In Ticked, Show Fields >>>>>
        Label_InDate.Visible = True
        Label_PassedToAdvisor.Visible = True
        Label_ChasedByChaser.Visible = True
        Label_ChasedByTelesales.Visible = True
        Label_QProvider.Visible = True
        Label_QAddress.Visible = True
        Label_QName.Visible = True
        Label_QDOB.Visible = True
        Label_QJoint.Visible = True
        Text_InDate.Visible = True
        Combo_PassedToAdvisor.Visible = True
        Check_ChasedByChaser.Visible = True
        Combo_ChasedByChaser.Visible = True
        Check_ChasedByTelesales.Visible = True
        Combo_ChasedByTelesales.Visible = True
        Combo_QProvider.Visible = True
        Combo_QAddress.Visible = True
        Combo_QName.Visible = True
        Combo_QDOB.Visible = True
        Check_QJoint.Visible = True
        Text_Score.Visible = True
    Else
'       <<<<< LOA In NOT Ticked, Hide Fields >>>>>
        Label_InDate.Visible = False
        Label_PassedToAdvisor.Visible = False
        Label_ChasedByChaser.Visible = False
        Label_ChasedByTelesales.Visible = False
        Label_QProvider.Visible = False
        Label_QAddress.Visible = False
        Label_QName.Visible = False
        Label_QDOB.Visible = False
        Label_QJoint.Visible = False
        Text_InDate.Visible = False
        Combo_PassedToAdvisor.Visible = False
        Check_ChasedByChaser.Visible = False
        Combo_ChasedByChaser.Visible = False
        Check_ChasedByTelesales.Visible = False
        Combo_ChasedByTelesales.Visible = False
        Combo_QProvider.Visible = False
        Combo_QAddress.Visible = False
        Combo_QName.Visible = False
        Combo_QDOB.Visible = False
        Check_QJoint.Visible = False
        Text_Score.Visible = False
    End If
Dan Jackson OP  @Reply  
            
4 years ago
Just to be clear, it's the top half that isn't working
Dan Jackson OP  @Reply  
            
4 years ago
Actually, it works on After Update but affects all records. This is the quirk with continuous forms.

I saw a post about applying VBA to different records on a continuous form somewhere. Any thoughts?
A Glenn Yesner  @Reply  
     
4 years ago
Just a thought, it seems you want the fields NOT visible by default, if so then start by declaring those fields visible  = False (no IF statement) then below that use the if statement to check the checkbox LOAIn and make the visible property of the controls True. Plus you'll need code in the checkbox to update the form if checkbox is checked after the form is loaded.
Adam Schwanz  @Reply  
            
4 years ago
Ive always used creative work arounds with things like transparent and/or textboxes and conditional formatting for continuous forms. If there is a way to apply vba to specific records i would be learning something new too :) but i believe vba always affects all records in a continuous form all or nothing. You could use an iif statement on an invisible text box, if checkloa is true than set the textbox to 1, otherwise 0. Then add to your code on click that if that invisible text box is 0 do nothing, otherwise run the normal code, and then just hide the buttons with transparent and conditional formatting.
Dan Jackson OP  @Reply  
            
4 years ago
Appreciate it.

@ A Glenn - The code is working fine (I initially thought it was the different halves) but the problem is that the VBA is applying the settings to all the records based on what the first record is set to. Since the first record was unticked, all the boxes in all the records were made invisible. This became apparent when i put it on the on_load event.

Adam. You're right. Might have to experiment with the conditional formatting. Thanks for sharing the suggestion. I'll give it a go

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 12:05:01 PM. PLT: 1s