Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010

    Unanswered: Global color change on Forms


    I have an application in A2007 and I want to re-brand the 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:

    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

  2. #2
    Join Date
    Oct 2009
    here's a book with what seems to be an example:
    Microsoft Access Solutions by Arvin Meyer & Douglas Steele
    Wiley Publishing 2010
    p. 260 gives code on how to mass change back color of all forms.....sorry but would be too much code for me to retype here....

    hope this helps a little.
    www CahabaData com

  3. #3
    Join Date
    Feb 2010
    Thanks for the info - looks to be a very useful book

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts