Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Inventory < Benefits of Access | Overlapping Windows >
Back to Inventory    Comments List
Upload Images   Link   Email  
Isshipped form bkground color
Phil Harris 
   
3 years ago
I have found the extended cut very useful, but would like to add some VBA to the AfterUpdate IsShipped Private sub. I would like to change the background color of the form if IsShipped is checked. Is this possible? Phil
Kevin Robertson 
          
3 years ago
Yes. Forms don't have a Backcolor property though. Sections do.

You can either use the name of the Section.
Me.Section("Detail").BackColor = RGB(255, 0, 0)

Or use the index number of the Section.
Me.Section(0).BackColor = RGB(255, 0, 0)

0 - Detail
1 - Form Header
2 - Form Footer


To change the Backcolor of the 3 sections together (I intentionally left out Page Header and Page Footer for forms) you can loop through them with a For Next Loop.

Dim X As Integer
    
For X = 0 To 2
    Me.Section(X).BackColor = RGB(255, 0, 0)
Next


Change the RGB value to the color you want.
Phil Harris OP 
   
3 years ago
Excellent, I will experiment with these suggestions. Thanks for the quick response! Phil
Kevin Yip 
     
3 years ago
Me.Section(1) or (2) will cause a run-time error if the form doesn't have a header or footer section.  So you need to watch for that.

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

 
 
 

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 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 2/15/2025 3:53:55 PM. PLT: 1s