HandsOn Using the Indent Outdent Feature

1. Open the Acc2003_Chap02.mdb file from the book's downloadable files. This file is a copy of the Northwind sample database that comes with Microsoft Access.

2. Press Alt+F11 to switch to the Visual Basic Editor window.

3. In the Project Explorer window, double-click on the Form_Orders object in the Microsoft Office Access Class Objects folder. The Code window should now show the event procedures written for this form.

4. In the Code window, select any block of code beginning with the keyword If and ending with the keywords End If.

5. Click the Indent button tp on the Edit toolbar or press Tab on the keyboard. The selected block of instructions will move four spaces to the right. You can adjust the number of spaces to indent to your liking by choosing Tools | Options and entering the appropriate value in the Tab Width box on the Editor tab.

6. Click the Outdent button on the Edit toolbar or press Shift+Tab to return the selected lines of code to the previous location in the Code window. The Indent and Outdent options are also available from the Visual Basic Editor's Edit menu.

0 0

Post a comment