Background Color

S

Shari

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.
 
F

fredg

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.

Delete the form's Picture property.
Then you can set the backcolor of each of the form's sections (Form
Header, Form Detail, Form Footer).
Each one has to be set independently.
 
L

Linq Adams via AccessMonster.com

If you find yourself doing this much, you might want to create one or more
AutoForms. Once they're created, you can choose them as your form's format
from within the Wizard. Here's a quick tutorial:

You can turn any form you have into a custom AutoForm. Select an existing
form or create a new form, formatted as you prefer. From Design View for the
form, goto Format - AutoFormat and click on "Customize." Now check the radio
button for "Create a new AutoFormat based on YourFormName." You'll be asked
to give the AutoFormat a name, then you're done.

Now, anytime you want to use this same formatting for a form, from the Form
Wizard select the AutoFormat, or from form Design View goto Format -
AutoFormat and select the AutoFormat you want to use. And here's the best
part, you can do this to a form you've already created using another
formatting, and it will change that form 's formatting to the newly chosen
AutoFormat!
 
A

Arvin Meyer [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top