Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
Change Defaults on Forms
Monica Jones 
       
3 hours ago
I have to share this! I was sick of changing fonts, size, color, all that. Did a quick Google and found this from Mike Wolfe! No more manually making label fonts black!

https://nolongerset.com/set-default-form-font/
Alkan Toykan  @Reply  
       
2 hours ago
My recommendation would be to implement a global module similar to the one below:
Public Sub ApplyGlobalFormTheme()
    Dim obj As AccessObject, frm As Form, ctl As Control
    Dim BackColor As Long, ForeColor As Long, BorderColor As Long, ButtonBackColor As Long

    Const cFontName As String = "your font"
    Const cFontSize As Long = 10
    BackColor = RGB(255, 255, 255)          
    ForeColor = RGB(32, 32, 32)            
    BorderColor = RGB(180, 180, 180)        
    ButtonBackColor = RGB(240, 240, 240)

    For Each obj In CurrentProject.AllForms

        DoCmd.OpenForm obj.Name, acDesign
        Set frm = Forms(obj.Name)

        frm.FontName = cFontName
        frm.FontSize = cFontSize

        frm.Detail.BackColor = RGB(248, 248, 248)

        For Each ctl In frm.Controls

            On Error Resume Next

            Select Case ctl.ControlType

                '==================================
                ' TextBox
                '==================================
                Case acTextBox

                    ctl.FontName = cFontName
                    ctl.FontSize = cFontSize
                    ctl.BackColor = BackColor
                    ctl.ForeColor = ForeColor
                    ctl.BorderColor = BorderColor
                    ctl.BorderWidth = 1
                    ctl.BorderStyle = 1
............................

using a Select Case statement, you can configure the settings of controls like textboxes, listboxes, comboboxes, etc., within a single public sub. It's an approach I prefer over the template form method.
Richard Rost  @Reply  
          
2 hours ago
That looks like a handy tip, Monica. Setting the defaults in Options is definitely easier than manually fixing every new control.

Alkan's approach is useful too if you need to apply a consistent theme to forms you already have. Just be careful with a routine that opens and modifies every form automatically - make a backup first.
Donald Blackwell  @Reply  
       
27 minutes ago
Daniel over at Devhut also has a nice little couple videos and articles on subclasses forms. By creating an class module then calling it in every form you can define appearance and behavior of all basic form functions from one class module. Including event handling.
Add a Reply Upload an Image
Next Unseen

 
 
What's This?

 

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: 11/4/2026 3:00:49 PM. PLT: 1s