AutoCenter Property [Access 2003 VBA Language Reference]

Returns or sets a Boolean indicating whether a form or report will be centered automatically in the application window when the form is opened. Read/write.

expression.AutoCenter

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

Setting

The AutoCenter property uses the following settings.

Setting Visual Basic Description
Yes True The form or report will be centered automatically on opening.
No False (Default) The form or report's upper-left corner will be in the same location as when the form or report was last saved.

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

You can set this property only in Design view.

Remarks

Depending on the size and placement of the application window, forms or reports can appear off to one side of the application window, hiding part of the form or report. Centering the form or report automatically when it's opened makes it easier to view and use.

If you make any changes in Design view to a form whose AutoResize property is set to No and whose AutoCenter property is set to Yes, switch to Form view before saving the form. If you don't, Microsoft Access clips the form on the right and bottom edges the next time you open the form.

Applies to | Form Object | Report Object

See Also | AutoResize Property