Changing the background on a form ???

  • Thread starter Thread starter ZBC
  • Start date Start date
Z

ZBC

I created several forms (about 20) using the 'wizzard' and in 'most'
cases chose 'sandstone' and be background. I would like to make all the
forms appear the same, but I cannot find where to change the background
in properties.

Do I have to start them all over again by using the wizard or is there
some way I can change them?
Bob
 
In Design mode Form>Properties>Picture - it will display 'bitmap', click
on the button to the right of the field and it will pull up a dialog box.

In AccessXP the file is C:\Program Files\Microsoft
Office\Office10\Bitmaps\Styles\ACSNDSTN.gif

Eric Dreksler
 
ZBC said:
I created several forms (about 20) using the 'wizzard' and in 'most'
cases chose 'sandstone' and be background. I would like to make all
the forms appear the same, but I cannot find where to change the
background in properties.

Do I have to start them all over again by using the wizard or is there
some way I can change them?
Bob

I don't understand what you mean by "be background". The background
picture characteristics can be set by copying them from an existing
form. Here's a routine you can use to make this process simpler:

'----- start of code -----
Sub CopyFormProperties( _
FromForm As String, _
ToForm As String, _
ParamArray PropertyName())

On Error GoTo Err_Handler

Dim frmFrom As Form
Dim intI As Integer

DoCmd.OpenForm FromForm, acDesign, WindowMode:=acHidden
DoCmd.OpenForm ToForm, acDesign, WindowMode:=acHidden

Set frmFrom = Forms(FromForm)

With Forms(ToForm)
For intI = LBound(PropertyName) To UBound(PropertyName)
.Properties(PropertyName(intI)) = _
frmFrom.Properties(PropertyName(intI))
Next intI
End With

Exit_Point:
Set frmFrom = Nothing
DoCmd.Close acForm, FromForm, acSaveNo
DoCmd.Close acForm, ToForm, acSaveYes
Exit Sub

Err_Handler:
MsgBox Err.Description, vbExclamation, "Error " & Err.Number
Resume Exit_Point

End Sub
'----- end of code -----

You could call it to copy the picture properties of FormA to FormB like
this:

CopyFormProperties "FormA", "FormB", _
"PictureType", "PictureData", "PictureSizeMode", _
"PictureAlignment", "PictureTiling"
 
Eric,

I have not idea how you came up with that so fast? I would have never
found it!
Thanks a Bunch!

Bob
 
Dirk,

"be background" was a typo for ... 'the background'

Your answer was not exactly where I was heading, but it certainly give me another approach!
I will never cease to be amazed with the knowledge that is present in these newsgroups! I would never been able to get past first base without the help of those in these groups! I bought 6 books when I started my project ... 80% of my knowledge has come from reading and asking questions of the Access newsgroups.

Thanks Much!
Bob
 
Back
Top