Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

ComboBox.TextAlign Property (Access)

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

expression .TextAlign

expression A variable that represents a ComboBox object.

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.

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

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:
© 2015 Microsoft