Share via


TextBox Object Members

Access Developer Reference

This object corresponds to a text box. Text boxes on a form or report display data from a record source.

Methods

  Name Description
Bb243662.methods(en-us,office.12).gif Move Moves the specified object to the coordinates specified by the argument values.
Bb243662.methods(en-us,office.12).gif Requery The Requery method updates the data underlying a specified control that's on the active form by requerying the source of data for the control.
Bb243662.methods(en-us,office.12).gif SetFocus The SetFocus method moves the focus to the specified form, the specified control on the active form, or the specified field on the active datasheet.
Bb243662.methods(en-us,office.12).gif SizeToFit You can use the SizeToFit method to size a control so it fits the text or image that it contains.
Bb243662.methods(en-us,office.12).gif Undo You can use the Undo method to reset a control or form when its value has been changed.

Properties

  Name Description
Bb243662.properties(en-us,office.12).gif AddColon Specifies whether a colon follows the text in labels for new controls. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif AfterUpdate Returns or sets which macro, event procedure, or user-defined function runs when the AfterUpdate event occurs. Read/write String.
Bb243662.properties(en-us,office.12).gif AllowAutoCorrect You can use the AllowAutoCorrect property to specify whetherthe specified control will automatically correct entries made by the user. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif Application You can use the Application property to access the active Microsoft Access Application object and its related properties. Read-only Application object
Bb243662.properties(en-us,office.12).gif AsianLineBreak Returns or sets a Boolean indicating whether line breaks in text boxes follow rules governing East Asian languages. True to control line breaks based on East Asian language rules. Read/write.
Bb243662.properties(en-us,office.12).gif AutoLabel Specifies whether labels are automatically created and attached to new controls. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif AutoTab You can use the AutoTab property to specify whether an automatic tab occurs when the last character permitted by a text box control's input mask is entered. An automatic tab moves the focus to the next control in the form's tab order. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif BackColor Gets or sets the interior color of the specified object. Read/write Long.
Bb243662.properties(en-us,office.12).gif BackStyle You can use the BackStyle property to specify whether a control will be transparent. Read/write Byte.
Bb243662.properties(en-us,office.12).gif BeforeUpdate Returns or sets which macro, event procedure, or user-defined function runs when the BeforeUpdate event occurs. Read/write String.
Bb243662.properties(en-us,office.12).gif BorderColor You can use the BorderColor property to specify the color of a control's border. Read/write Long.
Bb243662.properties(en-us,office.12).gif BorderStyle Specifies how a control's border appears.Read/write Byte.
Bb243662.properties(en-us,office.12).gif BorderWidth You can use the BorderWidth property to specify the width of a control's border. Read/write Byte.
Bb243662.properties(en-us,office.12).gif BottomMargin Along with the LeftMargin, RightMargin, and TopMargin properties, specifies the location of information displayed within a text box control. Read/write Integer.
Bb243662.properties(en-us,office.12).gif BottomPadding Gets or sets the amount of space (in inches) between the text box and its bottom gridline. Read/write Integer.
Bb243662.properties(en-us,office.12).gif CanGrow Gets or sets whether the specified control automatically adjusts vertically to print or preview all the data the control contains. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif CanShrink Gets or sets whether the specified control automatically adjusts vertically to print or preview all the data the section or control contains. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif ColumnHidden You can use the ColumnHidden property to show or hide a specified column in Datasheet view. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif ColumnOrder You can use the ColumnOrder property to specify the order of the columns in Datasheet view. Read/write Integer.
Bb243662.properties(en-us,office.12).gif ColumnWidth You can use the ColumnWidth property to specify the width of a column in Datasheet view. Read/write Integer.
Bb243662.properties(en-us,office.12).gif Controls Returns the Controls collection of a form, subform, report or section. Read-only Controls.
Bb243662.properties(en-us,office.12).gif ControlSource You can use the ControlSource property to specify what data appears in a control. You can display and edit data bound to a field in a table, query, or SQL statement. You can also display the result of an expression. Read/write String.
Bb243662.properties(en-us,office.12).gif ControlTipText You can use the ControlTipText property to specify the text that appears in a ScreenTip when you hold the mouse pointer over a control. Read/write String.
Bb243662.properties(en-us,office.12).gif ControlType You can use the ControlType property in Visual Basic to determine the type of a control on a form or report. Read/write Byte.
Bb243662.properties(en-us,office.12).gif DecimalPlaces You can use the DecimalPlaces property to specify the number of decimal places Microsoft Access uses to display numbers. Read/write Byte.
Bb243662.properties(en-us,office.12).gif DefaultValue Specifies a value that is automatically entered in a field when a new record is created. For example, in an Addresses table you can set the default value for the City field to New York. When users add a record to the table, they can either accept this value or enter the name of a different city. Read/write String.
Bb243662.properties(en-us,office.12).gif DisplayAsHyperlink Gets or sets an AcDisplayAsHyperlink constant that specifies whether to display the contents of the specified text box as a hyperlink. Read/write.
Bb243662.properties(en-us,office.12).gif DisplayWhen You can use the DisplayWhen property to specify which of a form's controls you want displayed on screen and in print. Read/write Byte.
Bb243662.properties(en-us,office.12).gif Enabled You can use the Enabled property to set or return the status of the conditional format in the FormatCondition object. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif EnterKeyBehavior You can use the EnterKeyBehavior property to specify what happens when you press ENTER in a text box control in Form view or Datasheet view. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif EventProcPrefix Gets or sets the prefix portion of an event procedure name. Read/write String.
Bb243662.properties(en-us,office.12).gif FilterLookup You can use the FilterLookup property to specify whether values appear in a bound text box control when using the Filter By Form or Server Filter By Form window. Read/write Byte.
Bb243662.properties(en-us,office.12).gif FontBold You can use the FontBold property to specify whether a font appears in a bold style in the following situations: When displaying or printing controls on forms and reports. When using the Print method on a report. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif FontItalic You can use the FontItalic property to specify whether text is italic in the following situations: When displaying or printing controls on forms and reports. When using the Print method on a report. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif FontName You can use the FontName property to specify the font for text in the following situations: When displaying or printing controls on forms and reports. When using the Print method on a report. Read/write String.
Bb243662.properties(en-us,office.12).gif FontSize You can use the FontSize property to specify the point size for text in the following situations: When displaying or printing controls on forms and reports. When using the Print method on a report. Read/write Integer.
Bb243662.properties(en-us,office.12).gif FontUnderline You can use the FontUnderline property to specify whether text is underlined in the following situations: When displaying or printing controls on forms and reports. When using the Print method on a report. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif FontWeight You can use the DatasheetFontWeight property to specify the line width of the font used to display and print characters for field names and data in Datasheet view. Read/write Integer.
Bb243662.properties(en-us,office.12).gif ForeColor You can use the ForeColor property to specify the color for text in a control. Read/write Long.
Bb243662.properties(en-us,office.12).gif Format You can use the Format property to customize the way numbers, dates, times, and text are displayed and printed. Read/write String.
Bb243662.properties(en-us,office.12).gif FormatConditions You can use the FormatConditions property to return a read-only reference to the FormatConditions collection and its related properties.
Bb243662.properties(en-us,office.12).gif FuriganaControl Language-specific informationYou can use the FuriganaControl property to indicate a target control and automatically create furigana for text entered in a text box. Read/write String.
Bb243662.properties(en-us,office.12).gif GridlineColor Gets or sets the color of the gridline for the specified text box. Read/write Long.
Bb243662.properties(en-us,office.12).gif GridlineStyleBottom Gets or sets the bottom gridline style of the specified text box. Read/write Byte.
Bb243662.properties(en-us,office.12).gif GridlineStyleLeft Gets or sets the width of the bottom gridline for the specified text box. Read/write Byte.
Bb243662.properties(en-us,office.12).gif GridlineStyleRight Gets or sets the right gridline style of the specified text box. Read/write Byte.
Bb243662.properties(en-us,office.12).gif GridlineStyleTop Gets or sets the top gridline style of the specified text box. Read/write Byte.
Bb243662.properties(en-us,office.12).gif GridlineWidthBottom Gets or sets the width of the bottom gridline for the specified text box. Read/write Byte.
Bb243662.properties(en-us,office.12).gif GridlineWidthLeft Gets or sets the width of the left gridline for the specified text box. Read/write Byte.
Bb243662.properties(en-us,office.12).gif GridlineWidthRight Gets or sets the width of the right gridline for the specified text box. Read/write Byte.
Bb243662.properties(en-us,office.12).gif GridlineWidthTop Gets or sets the width of the top gridline for the specified text box. Read/write Byte.
Bb243662.properties(en-us,office.12).gif Height Gets or sets the height of the specified object in twips. Read/write Integer.
Bb243662.properties(en-us,office.12).gif HelpContextId The HelpContextID property specifies the context ID of a topic in the custom Help file specified by the HelpFile property setting. Read/write Long.
Bb243662.properties(en-us,office.12).gif HideDuplicates You can use the HideDuplicates property to hide a control on a report when its value is the same as in the preceding record. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif HorizontalAnchor Gets or sets an AcHorizontalAnchor constant that indicates how the text box is anchored horizontally within its layout. Read/write.
Bb243662.properties(en-us,office.12).gif Hyperlink You can use the Hyperlink property to return a reference to a Hyperlink object. You can use the Hyperlink property to access the properties and methods of a control's hyperlink. Read-only.
Bb243662.properties(en-us,office.12).gif IMEHold Language-specific information You can use the IMEHold/Hold KanjiConversionMode property to show whether the Kanji Conversion Mode is maintained when the control loses the focus. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif IMEMode Language-specific informationYou can use the IMEMode property to set a control's Kanji Conversion Mode when the focus shifts to the control. Read/write.
Bb243662.properties(en-us,office.12).gif IMESentenceMode Language-specific information You can use the IMESentenceMode property to specify or determine the IME Sentence Mode of fields of a table or controls of a form that switch when the focus moves.Read/write.
Bb243662.properties(en-us,office.12).gif InputMask You can use the InputMask property to make data entry easier and to control the values users can enter in a text box control. Read/write String.
Bb243662.properties(en-us,office.12).gif InSelection You can use the InSelection property to determine or specify whether a control on a form in Design view is selected. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif IsHyperlink You can use the IsHyperlink property to specify or determine if the data contained in a text box is a hyperlink. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif IsVisible You can use the IsVisible property in to determine whether a control on a report is visible. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif KeyboardLanguage Language-specific information You can use the KeyboardLanguage property to specify or determine the keyboard language on entry into a control. Read/write Byte.
Bb243662.properties(en-us,office.12).gif LabelAlign The property specifies the text alignment within attached labels on new controls. Read/write Byte.
Bb243662.properties(en-us,office.12).gif LabelX Language-specific informationThe LabelX property (along with the LabelY property) specifies the placement of the label for a new control. Read/write Integer.
Bb243662.properties(en-us,office.12).gif LabelY Language-specific informationThe LabelY property (along with the LabelX property) specifies the placement of the label for a new control. Read/write Integer.
Bb243662.properties(en-us,office.12).gif Layout Returns the type of layout for the specified text box. Read-only AcLayoutType.
Bb243662.properties(en-us,office.12).gif LayoutID Returns the unique identifier for the layout that contains the specified text box. Read-only Long.
Bb243662.properties(en-us,office.12).gif Left You can use the Left property to specify an object's location on a form or report. Read/write Integer.
Bb243662.properties(en-us,office.12).gif LeftMargin Along with the TopMargin, RightMargin, and BottomMargin properties. specifies the location of information displayed within a text box control. Read/write Integer.
Bb243662.properties(en-us,office.12).gif LeftPadding Gets or sets the amount of space (in inches) between the text box and its left gridline. Read/write Integer.
Bb243662.properties(en-us,office.12).gif LineSpacing You can use the LineSpacing property to specify or determine the location of information displayed within a label or text box control. Read/write Integer.
Bb243662.properties(en-us,office.12).gif Locked The Locked property specifies whether you can edit data in a control in Form view. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif Name You can use the Name property to specify or determine the string expression that identifies the name of an object. Read/write String.
Bb243662.properties(en-us,office.12).gif NumeralShapes Language-specific informationYou can use the NumeralShapes property to specify or determine numeral shapes to be displayed and printed in a combo box, label, list box, or text box. Read/write Byte.
Bb243662.properties(en-us,office.12).gif OldBorderStyle You can use this property to set or returns the unedited value of the BorderStyle property for a form or control. This property is useful if you need to revert to an unedited or preferred border style. Read/write Byte.
Bb243662.properties(en-us,office.12).gif OldValue You can use the OldValue property to determine the unedited value of a bound control. Read-only Variant.
Bb243662.properties(en-us,office.12).gif OnChange Sets or returns the value of the On Change box in the Properties window of one of the objects in the Applies To list. Read/write String.
Bb243662.properties(en-us,office.12).gif OnClick Sets or returns the value of the On Click box in the Properties window. Read/write String.
Bb243662.properties(en-us,office.12).gif OnDblClick Sets or returns the value of the On Dbl Click box in the Properties window. Read/write String.
Bb243662.properties(en-us,office.12).gif OnDirty Sets or returns the value of the On Dirty box in the Properties window of a form or report. Read/write String.
Bb243662.properties(en-us,office.12).gif OnEnter Sets or returns the value of the On Enter box in the Properties window of specified object. Read/write String.
Bb243662.properties(en-us,office.12).gif OnExit Sets or returns the value of the On Exit box in the Properties window of specified object. Read/write String.
Bb243662.properties(en-us,office.12).gif OnGotFocus Sets or returns the value of the On Got Focus box in the Properties window of the specified object. Read/write String.
Bb243662.properties(en-us,office.12).gif OnKeyDown Sets or returns the value of the On Key Down box in the Properties window. Read/write String.
Bb243662.properties(en-us,office.12).gif OnKeyPress Sets or returns the value of the On Key Press box in the Properties window. Read/write String.
Bb243662.properties(en-us,office.12).gif OnKeyUp Sets or returns the value of the On Key Up box in the Properties window. Read/write String.
Bb243662.properties(en-us,office.12).gif OnLostFocus Sets or returns the value of the On Lost Focus box in the Properties window of the specified object. Read/write String.
Bb243662.properties(en-us,office.12).gif OnMouseDown Sets or returns the value of the On Mouse Down box in the Properties window. Read/write String.
Bb243662.properties(en-us,office.12).gif OnMouseMove Sets or returns the value of the On Mouse Move box in the Properties window. Read/write String.
Bb243662.properties(en-us,office.12).gif OnMouseUp Sets or returns the value of the On Mouse Up box in the Properties window. Read/write String.
Bb243662.properties(en-us,office.12).gif OnUndo Returns or sets a String indicating which macro, event procedure, or user-defined function runs when the Undo event occurs. Read/write..
Bb243662.properties(en-us,office.12).gif Parent Returns the parent object for the specified object. Read-only.
Bb243662.properties(en-us,office.12).gif PostalAddress You can use the PostalAddress Property property to specify or determine the postal code and the Customer Barcode data corresponding to the address information displayed in a specified field/textbox. The PostalAddress Property wizard enables the setting of these properties. Read/write String.
Bb243662.properties(en-us,office.12).gif Properties Returns a reference to a control's Properties collection object. Read-only.
Bb243662.properties(en-us,office.12).gif ReadingOrder You can use the ReadingOrder property to specify or determine the reading order of words in text. Read/write Byte.
Bb243662.properties(en-us,office.12).gif RightMargin Along with the TopMargin, Left Margin, and BottomMargin properties, specifies the location of information displayed within text box control. Read/write Integer.
Bb243662.properties(en-us,office.12).gif RightPadding Gets or sets the amount of space (in inches) between the text box and its right gridline. Read/write Integer.
Bb243662.properties(en-us,office.12).gif RunningSum You can use the RunningSum property to calculate record-by-record or group-by-group totals in a report. Read/write Byte.
Bb243662.properties(en-us,office.12).gif ScrollBarAlign You can use the ScrollBarAlign to specify or determine the alignment of a vertical scroll bar. Read/write Byte.
Bb243662.properties(en-us,office.12).gif ScrollBars You can use the ScrollBars property to specify whether scroll bars appear on a text box control. Read/write Byte.
Bb243662.properties(en-us,office.12).gif Section You can identify these controls by the section of a form or report where the control appears. Read/write Integer.
Bb243662.properties(en-us,office.12).gif SelLength The SelLength property specifies or determines the number of characters selected in a text box. Read/write Integer.
Bb243662.properties(en-us,office.12).gif SelStart The SelStart property specifies or determines the starting point of the selected text or the position of the insertion point if no text is selected. Read/write Integer.
Bb243662.properties(en-us,office.12).gif SelText The SelText property returns a string containing the selected text. Read/write String.
Bb243662.properties(en-us,office.12).gif ShortcutMenuBar You can use the ShortcutMenuBar property to specify the shortcut menu that will appear when you right-click on the specified object. Read/write String.
Bb243662.properties(en-us,office.12).gif SmartTags Returns a SmartTags collection that represents the collection of smart tags that have been added to a control.
Bb243662.properties(en-us,office.12).gif SpecialEffect You can use the SpecialEffect property to specify whether special formatting will apply to the specified object. Read/write Byte.
Bb243662.properties(en-us,office.12).gif StatusBarText You can use the StatusBarText property to specify the text that is displayed in the status bar when a control is selected. Read/write String.
Bb243662.properties(en-us,office.12).gif TabIndex You can use the TabIndex property to specify a control's place in the tab order on a form or report. Read/write Integer.
Bb243662.properties(en-us,office.12).gif TabStop You can use the TabStop property to specify whether you can use the TAB key to move the focus to a control. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif Tag Stores extra information about a form, report, section, or control needed by a Microsoft Access application. Read/write String.
Bb243662.properties(en-us,office.12).gif Text You can use the Text property to set or return the text contained in a text box. Read/write String.
Bb243662.properties(en-us,office.12).gif TextAlign The TextAlign property specifies the text alignment in new controls. Read/write Byte.
Bb243662.properties(en-us,office.12).gif TextFormat Gets or sets whether rich text is displayed in the specified text box. Read/write AcTextFormat.
Bb243662.properties(en-us,office.12).gif Top You can use the Top property to specify an object's location on a form or report. Read/write Integer.
Bb243662.properties(en-us,office.12).gif TopMargin Along with the LeftMargin, RightMargin, and BottomMargin properties, specifies the location of information displayed within a text box control. Read/write Integer.
Bb243662.properties(en-us,office.12).gif TopPadding Gets or sets the amount of space (in inches) between the text box and its top gridline. Read/write Integer.
Bb243662.properties(en-us,office.12).gif ValidationRule You can use the ValidationRule property to specify requirements for data entered into a record, field, or control. When data is entered that violates the ValidationRule setting, you can use the ValidationText property to specify the message to be displayed to the user. Read/write String.
Bb243662.properties(en-us,office.12).gif ValidationText Use the ValidationText property to specify a message to be displayed to the user when data is entered that violates a ValidationRule setting for a record, field, or control. Read/write String.
Bb243662.properties(en-us,office.12).gif Value Determines or specifies the text in the text box. Read/write Variant.
Bb243662.properties(en-us,office.12).gif Vertical You can use the Vertical property to set a form control for vertical display and editing or set a report control for vertical display and printing. Read/write Boolean.
Bb243662.properties(en-us,office.12).gif VerticalAnchor Gets or sets an AcVerticalAnchor constant that indicates how the specified text box is anchored vertically within its layout. Read/write.
Bb243662.properties(en-us,office.12).gif Visible Returns or sets whether the object is visible. Read/write Boolean
Bb243662.properties(en-us,office.12).gif Width Gets or sets the width of the specified object in twips. Read/write Integer.

Events

  Name Description
Bb243662.events(en-us,office.12).gif AfterUpdate The AfterUpdate event occurs after changed data in a control or record is updated.
Bb243662.events(en-us,office.12).gif BeforeUpdate The BeforeUpdate event occurs before changed data in a control or record is updated.
Bb243662.events(en-us,office.12).gif Change The Change event occurs when the contents of the specified control changes.
Bb243662.events(en-us,office.12).gif Click The Click event occurs when the user presses and then releases a mouse button over an object.
Bb243662.events(en-us,office.12).gif DblClick The DblClick event occurs when the user presses and releases the left mouse button twice over an object within the double-click time limit of the system.
Bb243662.events(en-us,office.12).gif Dirty The Dirty event occurs when the contents of the specified control changes.
Bb243662.events(en-us,office.12).gif Enter The Enter event occurs before a control actually receives the focus from a control on the same form or report.
Bb243662.events(en-us,office.12).gif Exit The Exit event occurs just before a control loses the focus to another control on the same form or report.
Bb243662.events(en-us,office.12).gif GotFocus The GotFocus event occurs when the specified object receives the focus.
Bb243662.events(en-us,office.12).gif KeyDown The KeyDown event occurs when the user presses a key while a form or control has the focus. This event also occurs if you send a keystroke to a form or control by using the SendKeys action in a macro or the SendKeys statement in Visual Basic.
Bb243662.events(en-us,office.12).gif KeyPress The KeyPress event occurs when the user presses and releases a key or key combination that corresponds to an ANSI code while a form or control has the focus. This event also occurs if you send an ANSI keystroke to a form or control by using the SendKeys action in a macro or the SendKeys statement in Visual Basic.
Bb243662.events(en-us,office.12).gif KeyUp The KeyUp event occurs when the user releases a key while a form or control has the focus. This event also occurs if you send a keystroke to a form or control by using the SendKeys action in a macro or the SendKeys statement in Visual Basic.
Bb243662.events(en-us,office.12).gif LostFocus The LostFocus event occurs when the specified object loses the focus.
Bb243662.events(en-us,office.12).gif MouseDown The MouseDown event occurs when the user presses a mouse button.
Bb243662.events(en-us,office.12).gif MouseMove The MouseMove event occurs when the user moves the mouse.
Bb243662.events(en-us,office.12).gif MouseUp The MouseUp event occurs when the user releases a mouse button.
Bb243662.events(en-us,office.12).gif Undo Occurs when the user undoes a change.