Create form with access 2k3 color scheme with access 2k7?

  • Thread starter Thread starter Dan Neely
  • Start date Start date
D

Dan Neely

Is there any way to do this? A mix of gray and blue forms in one app
looks awful, and since not all of the target machines are running 2k7
switching the entire app to the new color scheme doesn't really make
sense either.
 
Why don't you build your own color scheme? That's a solution which will work
in any version.

You can change the BackColor of all your forms in a few seconds with the
following code. The color 16777215 is an offwhite, but you can pick any
color and use it. Just use the color picker (click on the ellipses button in
the Backcolor field):

Public Sub SetBackColor()
' Arvin Meyer 2/11/2007
On Error GoTo Error_Handler

Dim doc As DAO.Document
Dim db As DAO.Database
Dim frm As Form

Set db = CurrentDb

For Each doc In db.Containers("Forms").Documents
DoCmd.OpenForm doc.Name, acDesign
Set frm = Forms(doc.Name)
frm.Picture = "(none)"
On Error Resume Next
frm.Section(0).BackColor = 16777215
frm.Section(1).BackColor = 16777215
frm.Section(2).BackColor = 16777215
DoEvents
DoCmd.Close acForm, doc.Name, acSaveYes
Next

Exit_Here:
Set doc = Nothing
Set db = Nothing
Exit Sub

Error_Handler:
MsgBox Err.Number & ": " & Err.Description, vbOKOnly, "Error"
Resume Exit_Here

End Sub
 
Back
Top