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 
Run Multiple Private Subs
Colby Wolford 
    
3 years ago
Context:
Since I was laid off back in October, I created a spreadsheet to track all of the positions I've applied to, all the job details, and all of the recruiters I've spoken with. That became a mess, so I've just created a database to track all the info so I can stay organized.

Issue:
--If the job is a Contract position, then the Contract Length, Possible Extension, and Possible Conversion fields are grayed out unless Contract (checkbox) is True.

--If the job requires travel, then the Travel Amount field is grayed out unless Travel (checkbox) is True.

I followed the "How to Gray Out Fields Based on A Selected Value" video and got the Contract portion works fine. However, I don't know how to call multiple subroutines under one private sub to make the Travel portion work.

CODE BELOW:
Private Sub Form_Current()

    DisableContract
    DisableTravel
    
End Sub

Private Sub DisableContract()

    If Contract Then
        ContractLength.Enabled = True
        ContractConversion.Enabled = True
        ContractExtension.Enabled = True
    Else
        ContractLength.Enabled = False
        ContractConversion.Enabled = False
        ContractExtension.Enabled = False
    End If
        
End Sub

Private Sub DisableTravel()

    If TravelRequired Then
        TravelAmount.Enabled = True
    Else
        TravelAmount.Enabled = False
    End If
    
End Sub

Any and all help is greatly appreciated. Thanks in advance for your time and efforts!
Kevin Robertson  @Reply  
           
3 years ago
What isn't working? I just built a sample database using your exact code and it works fine.
Colby Wolford OP  @Reply  
    
3 years ago
Sorry, I should have put that in the original post. I'll edit it.

The issue is that when I click on TravelRequired, the TravelAmount does not change to enabled--it remains grayed out. If I coded that correctly, then I'm wondering why it's working for you but not for me.
Colby Wolford OP  @Reply  
    
3 years ago

Kevin Robertson  @Reply  
           
3 years ago
Did you add an After Update event to the Check Box?
Colby Wolford OP  @Reply  
    
3 years ago
That was it! Solved. Thank you so much for your help!
Kevin Robertson  @Reply  
           
3 years ago
You're welcome.

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/8/2026 9:33:30 PM. PLT: 0s