Tuesday, July 29, 2014

How To Creating a Sub Procedure in Access 2003

You can either type a Sub procedure directly into the Modules window, or the Visual Basic Editor can insert it for you. Sub procedures all begin with the line: Sub ProcedureName( ) where ProcedureName is the name of the Sub procedure. If the Sub procedure includes arguments, enter them between the opening and closing parentheses. Not every Sub procedure requires arguments. After entering the first line, which names the procedure, you can insert the procedure's VBA commands. Each Sub procedure ends with the line: End Sub

Create a Sub Procedure


graphics/1_icon.jpg
In the Visual Basic Editor, click the Module window to select it.
graphics/2_icon.jpg
Click the Insert menu, and then click Procedure.
graphics/3_icon.jpg
Enter the procedure's name.
graphics/4_icon.jpg
Click the Sub option, if necessary.
graphics/5_icon.jpg Click OK.
The Editor inserts the opening and closing lines of the new Sub procedure.
graphics/14inf03.jpg