Shari said:
I created my form in the wizard, but can not figure out how to make the
background a color instead of the set background. Is it possible to change
this? I am using 2000.
This will kill all pictures and set all background colors to white. Change
the number for whichever color you want:
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