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 
VBA to Disable and Enable Ctrl
Dan Jackson 
            
4 years ago
Hi,

My status box has an option for referred (#56) and i'm trying to disable controls when selected. The first part works but doesn't re-enable the controls when changed to something else. What am i doing wrong?

==================================

   If [Combo_Status] = 56 Then
        If MsgBox("This will set the record to REFERRED and clear entries in" & vbCrLf & _
        "Advisor, Mortgage Type, Lender, Account Number and Most Figures", vbOKCancel) = vbOK Then
    [Combo_AdvisorID].Enabled = False
    [Combo_AdvisorID].BackColor = RGB(216, 216, 216)
                Else
    [Combo_AdvisorID].Enabled = True
    [Combo_AdvisorID].BackColor = RGB(255, 255, 255)

===================================

It's the else bit that isn't working. It's on After Update for the status combo control

Many Thanks
Dan Jackson OP  @Reply  
            
4 years ago
Just resolved. Was because the else was in the MSGBOX IF, needed to move it down!!!
Scott Axton  @Reply  
        
4 years ago
Look at you!  Fixing your own issues.  
Sometimes just posting it makes you see the errors.  LOL
Just like I always see my tyoz  (err... typos) right after I hit submit.
Dan Jackson OP  @Reply  
            
4 years ago
Gotta love those issues that fix themselves. The amount of times i get called over to fix a computer problem which is fixed by the time i get to the desk!
Dan Jackson OP  @Reply  
            
4 years ago
Just noticed my trekkie badge! Where's my graduation ceremony???
Richard Rost  @Reply  
          
4 years ago
Yeah, it's hard to read your code if it's not properly indented. I know it's a style issue, but it's important.

Graduation? Here you 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 3:41:38 PM. PLT: 0s