Declare Global Variables Using the LocalVariables Property

If you wish to declare global variables of any of the standard data types (String, Integer, Double, etc.) and have them show up in the Basic Wizard, you can use the LocalVariables property of TheFrame/TheView or Section.

To use the LocalVariables property:

  1. Select then right-click an object to display the Property Sheet for The Frame/The View.

  2. Select the Settings tab.

  3. Scroll down to the LocalVariables property.

  4. Double-click the LocalVariables property to display the Local Variables dialog box.

Local Variables dialog box

The Local Variables dialog box allows local variables of any of the basic types to be added, removed, named, and initial values to be set. Again, these variables are global to this template or form and are accessible from any of the BASIC code written for this template or form. They also appear in the Local Variables area of the Script Wizard.

The name "LocalVariables" is something of a misnomer, since variables declared in the Local Variables dialog box actually have a global scope to that particular template or form. It indicates that the variables declared here are "local" to this particular template or form and cannot be accessed on other forms. Nevertheless, they are set as global variables, available to other routines elsewhere in the template or form they are defined from.