Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TextAlign Property [Access 2003 VBA Language Reference]

Office 2003

The TextAlign property specifies the text alignment in new controls. Read/write Byte.

expression.TextAlign

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

Remarks

The TextAlign property uses the following settings.

Setting Visual Basic Description
General 0 (Default) The text aligns to the left; numbers and dates align to the right.
Left 1 The text, numbers, and dates align to the left.
Center 2 The text, numbers, and dates are centered.
Right 3 The text, numbers, and dates align to the right.
Distribute 4 The text, numbers, and dates are evenly distributed.

Note  You can set the TextAlign property by using the control's property sheet , a macro , or Visual Basic .

You can also set the TextAlign property by clicking Align Left, Center, and Align Right on the Formatting (Form/Report) toolbar.

You can set the default for the TextAlign property by using a control's default control style or the DefaultControl property in Visual Basic.

Example

The following example aligns the text in the "Address" text box on the "Suppliers" form to the right.

Forms("Suppliers").Controls("Address").TextAlign = 3
		




Show: