Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Developer > D23 > D23 Lessons < D22 Lessons | D24 Lessons >
 
Access Developer 23 Lessons


Back to Access Developer 23 Lessons
 

Alternating Background Fix Upload Images   Link  
Chris Bezant 
16 months ago
Hello Rick


Many tines you have commented about the alternating background colour. You asked for any help about this so here is my solution.

I adopted your idea of a template database and added a few features. The template database was saved as an Access template, so it appears on my Access start screen. I also adopted the idea of single and continuous template forms using the underscore naming convention to put them at the top of the form list.

In each form template I included code to fix the settings that I normally set every time. If there is a situation where these standard settings are inappropriate, I simply remove the relevant code. It is easier to remove unwanted code than write it every time.

The setting you mentioned is the alternating background colour. In the forms On Load event I have the following lines:

    Me.FormHeader.BackColor = Me.Detail.BackColor
    Me.FormHeader.BackColor = Me.Detail.BackColor
    Me.FormFooter.BackColor = Me.Detail.BackColor

Other settings are as follows:
I always like to remove tab stops from ID fields and buttons so here is my code for that:

Sub RemoveTabStopsFromIDFields()

    Dim Ctl As Control

    '-----------------------------------------------------------------------------
    ' Check all controls on form
    '-----------------------------------------------------------------------------
    For Each Ctl In Controls
        '-----------------------------------------------------------------------------
        ' Only process text boxes and buttons
        '-----------------------------------------------------------------------------
        If Ctl.ControlType = acTextBox _
           Or Ctl.ControlType = acCommandButton Then
            If Right(Ctl.Name, 2) = "ID" _
               Or Ctl.ControlType = acCommandButton _
               Then
                Ctl.TabStop = False
            End If
        End If

    Next Ctl

    Set Ctl = Nothing

End Sub

Other settings are:
    Me.ControlBox = False
    Me.NavigationButtons = False
    Me.RecordSelectors = False

    If Me.DefaultView = CONTINUOUSFORM Then
        Me.ScrollBars = SCROLLBARSVERTICALONLY
        Me.AllowEdits = False
        Me.AllowDeletions = False
    Else
        Me.ScrollBars = Scrollbarsnone
    End If
Richard Rost
16 months ago
That is awesome. Thank you so much for sharing. This would be a great thing for the Developer students. Unfortunately it's way over the head of 90% of the other Access students though. I love it though!

This thread is now closed. If you wish to comment, start a NEW discussion, below.
 


Back to Access Developer 23 Lessons
 

Start a NEW Conversation
 
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.
 
Subscribe
 

You may want to read these articles from the 599CD News:

5/16/2022Referential Integrity
5/15/2022Invoicing Member Discussion
5/13/2022Multivalued
5/12/2022Number Field Size
5/11/2022Create Word Document
5/11/2022Export to Word
5/10/2022On Click Event Timing
5/9/2022Invalid Use of Null
5/7/2022Event Handler
5/6/2022Database Title & Icon
 

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
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
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn