PictureSizeMode Property [Access 2003 VBA Language Reference]

You can use the PictureSizeMode property to specify how a picture for a form or report is sized. Read/write.

expression.PictureSizeMode

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

The PictureSizeMode property uses the following settings.

Setting Visual Basic Description
Clip 0 (Default) The picture is displayed in its actual size. If the picture is larger than the form or report, then the picture is clipped.
Stretch 1 The picture is stretched horizontally and vertically to fill the entire form, even if its original ratio of height to width is distorted.
Zoom 3 The picture is enlarged to the maximum extent possible while keeping its original ratio of height to width.

Note  You can set the PictureSizeMode property by using a form's or report's property sheet , a macro , or Visual Basic .

When a small picture is used for the Picture property of a form or report, setting the PictureSizeMode property to Stretch or Zoom can cause substantial distortion of its resolution. Smaller pictures can be tiled across the entire form or report by using the PictureTiling property.

Example

The following example sets the background picture of the "Order Entry" form to "Contacts.gif", and stretches the picture to fit the entire form's background.

With Forms("Order Entry")
    .Picture = "C:\Picture Files\Contacts.gif"
    .PictureSizeMode = 1
End With

Applies to | Form Object | Report Object

See Also | Picture Property | PictureAlignment Property | PictureData Property | PictureTiling Property | PictureType Property | SizeMode Property