Results 1 to 3 of 3
  1. #1
    pwdpwd is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    UK - Barnsley
    Posts
    6

    Globally changing colors on forms

    Hi

    I have an application in A2007 & I want to re-brand elements on the forms with a different color. This will apply to a range of header/footer backgrounds, text, labels, lines etc. I have looked at a range of options, and tried to get a solution to work, but (as I'm not good with VBA) without success. Where am I going wrong please? The code i have been using is:

    Code:
    Private Sub Command0_Click()
    
    Dim ao As AccessObject
    Dim ctl As control
    
    For Each ao In CodeProject.AllForms
    
       DoCmd.OpenForm ao.Name, acDesign
       With Forms(ao.Name)
       
           If ctl.ControlType = acHeader Then
               .Item.BackColor = RGB(0, 120, 144)
           End If
           ' Repeated for each relevant item as necessary
    
       End With
       DoCmd.Close acForm, ao.Name, acSaveYes
    
    Next ao
    
    End Sub
    Thanks

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    3 minutes before this post, you posted on AWF. probably more forums as well? that discourages an answer because people don't like to waste their own time. IMO.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Adam,
    Here's a great link to supply to these posters. It is in the sig of ConneXionLost, a frequest poster here. http://www.excelguru.ca/node/7

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Changing information display method in forms
    By mrbaggins in forum Forms
    Replies: 5
    Last Post: 10-21-2010, 06:00 AM
  2. 2 Colors Forms Header Eye Candy
    By Viggen66 in forum Forms
    Replies: 1
    Last Post: 06-25-2010, 07:32 AM
  3. Pie Chart Colors!
    By dannyowl in forum Access
    Replies: 0
    Last Post: 05-12-2010, 09:30 AM
  4. Replies: 0
    Last Post: 03-17-2009, 11:25 AM
  5. Replies: 2
    Last Post: 11-09-2005, 02:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums