Defining an array


show more Defining an array provides you with in-depth training on Business. Taught by Curt Frye as part of the Up and Running with VBA in Access show less
please wait ...

Defining an array

Most of the variables you deal with when you write Access VBA code will be single variables, such as item prices, shipping rates, and so on; however, if you must deal with a set of values of the same type, such as a set of shipping rates, you can do so by creating an array. In this movie, we'll use the code in the Define Arrays code module, so I'll double-click that over in the Navigation pane to open it. And I have a very simple subroutine. Basically, I have the DefineArrays subroutine named, and then I create a variable called ChargesCount, and that is an integer.

An array is a set of values of the same type. And you define an array like you would any other variable, but you add a number, or numbers, in parentheses after the variable's name to indicate the number of elements in the array. So let's say, for example, that you ship products using one of six different shipping rates, and that rate is based on the package's weight. To create an array to hold those six ...

Defining an array
Video duration: 6m 21s 4h 38m Advanced

Viewers:

Defining an array provides you with in-depth training on Business. Taught by Curt Frye as part of the Up and Running with VBA in Access

Subjects:
Business Developer IT
Software:
Access Visual Basic
Author:
please wait ...