O'Reilly logo

Access 2007 Programming by Example with VBA, XML, and ASP by Julitta Korol

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4Passing Arguments to Procedures and Functions

As you already know from Chapter 1, VBA procedures (both subroutines and functions) often require arguments to perform certain tasks. In this chapter, you learn various methods of passing arguments to procedures and functions.

Writing a Function Procedure

Function procedures can perform calculations based on data received through arguments. When you declare a function procedure, you list the names of arguments inside a set of parentheses, as shown in Hands-On 4-1.

Hands-On 4-1: Writing a Function Procedure with Arguments

1. Start Microsoft Office Access 2007 and create a new database named Chap04.accdb in your C:\Acc07_ByExample folder.

2. Once your new database is opened, press Alt+F11 to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required