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"