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 
Visible Property
Jerry Fowler 
       
2 years ago
I have a form that is an Event form. The main form has the info about the Event, the sub form has the attendees. for each attendee I have a checkbox (HonoredGuest) if checked we pay for their meal. on the row I also have a checkbox (IsPaid). For the ones that the HonoredGuest is checked I would like to make the IsPaid not visible and visa versa. Here is the code I'm currently trying to use (I know there are many ways to do this);

DetailsPrivate Sub HideIsPaid()
    
    Dim rs As DAO.Recordset

    Set rs = Me.RecordsetClone

    rs.MoveFirst
    Do While Not rs.EOF
        If rs!HonoredGuest.Value = -1 Then
            IsPaid.Visible = False
        Else
            IsPaid.Visible = True
        End If
        rs.MoveNext
    Loop

    rs.Close
    Set rs = Nothing
    
End Sub


I have tried first in the HonoredGuest AfterUpdate Event
     If honoredGuest then IsPaid.Visible = False
I did try something else but it's totally wiped from my brain lol

I'll attached two pics, seems when I have the last one checked all the IsPaid vanish.

Thanks
Jerry Fowler OP  @Reply  
       
2 years ago

Jerry Fowler OP  @Reply  
       
2 years ago

Kevin Robertson  @Reply  
          
2 years ago
You have told us what you want to happen in your form, however, you have neglected to tell us what the problem is and what is not working in your Form.
Jerry Fowler OP  @Reply  
       
2 years ago
So sorry about that Kevin, So what happens is when I click any of the HonorGuest checkboxes except the last one nothing changes, then if I click the last one all the IsPaid checkboxes disappear, even if it's the only one clicked.
Jerry Fowler OP  @Reply  
       
2 years ago
Kevin, did you put the code into the details dropdown? was that something I could have done? I couldn't see anywhere to do it.

Thanks for all the help!!
Kevin Robertson  @Reply  
          
2 years ago
If you make a field not visible in a continuous form then ALL records will show that field as NOT visible.
This video may help:
    Show/Hide Buttons
Jerry Fowler OP  @Reply  
       
2 years ago
Thats probably why in the past I've just given up on it, thanks for the suggested video I'll watch it.
Kevin Yip  @Reply  
     
2 years ago
You could make it a tri-state checkbox, with null indicating payment not applicable, or doesn't have to pay, etc.  

If the reason for hiding the checkbox is to prevent users from changing its value, you can lock the checkbox (and make it null) if the guest is an honored guest.  This can be done with the OnCurrent event.  Unlike the Visible property, this method won't affect the entire column.
Jerry Fowler OP  @Reply  
       
2 years ago
I appreciate all the input. I ended up using a textbox instead of a checkbox and if Honored Guest was checked then the textbox said "Covered", if Honored Guest was not checked then the textbox could be toggled between saying "Yes" or "No". I then used conditional formatting to change the color of the text and the background color.

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 7:43:09 AM. PLT: 0s