Running a Sub Procedure

After writing a Sub procedure, you may want to test it. You can run a Sub procedure from within the Visual Basic Editor, but you might have to return to Access to view the results. If the Sub procedure is a long one, you can also click buttons to pause it or to stop it altogether.

Run a Sub Procedure

graphics/1_icon.jpg

Click the Save button on the Database toolbar to save changes to the VBA project.

graphics/2_icon.jpg

Enter a name for your module if requested .

graphics/3_icon.jpg

Click anywhere within the Sub procedure that you want to run.

graphics/4_icon.jpg Click the Run Sub/User Form button on the Database toolbar.

If the Macros dialog box appears, select the macro you want to run, and then click Run.

graphics/5_icon.jpg

Return to Access, if necessary, to view the results of your Sub procedure.

graphics/14inf05.jpg

Did You Know?

You can rename a module . If you want to rename a module, select the module from the Project Explorer, and then enter a new name in the Name box, located in the Properties window.

You can run a procedure from the keyboard . You can also run a Sub procedure by pressing F5. If you need to halt the procedure, press the Ctrl and the Break keys simultaneously .




Show Me Microsoft Office Access 2003
Show Me Microsoft Office Access 2003
ISBN: 0789730049
EAN: 2147483647
Year: 2002
Pages: 318

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net