ACC2000: How to Insert the Tab Character in a RichText Control (210611)
The information in this article applies to:
This article was previously published under Q210611 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SUMMARY
In a RichTextBox control, the default behavior of the TAB key is to move the focus to the next control in the tab order of a form. This article
shows you how you can use the TAB key to insert a tab character into a
RichTextBox control.
The sample function ctlRichText1_KeyDown() traps for the TAB key in the
KeyDown event of the RichTextBox control. It prevents the control from losing focus, and then uses the SelText property of the control to insert the tab.
REFERENCESFor more information about ActiveX controls, click Microsoft Access Help on the
Help menu, type activex in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned.
For more information about the methods and properties of the RichTextBox control, open a database containing a form with a RichTextBox control. On the View menu, click Object Browser. In the Object Browser, select RichTextLib in the list of Libraries, and then select RichTextBox in the list of Classes.
Modification Type: | Major | Last Reviewed: | 6/24/2004 |
---|
Keywords: | kbhowto kbinfo KB210611 |
---|
|