In reading the programming guide pgs 47 - 54 I believe static variables would work best for my situation.
Quote:Simple Static variables, in contrast, retain their values only within the current
form, report, or Mass Update. In other words, as you move between records
in a form, you can retrieve (or update) a static variable. Although any
program connected to the current form can initialize, utilize and modify Static
variables, you must declare them in the Global Code section of the form:
stat MyName as String = "Linda Anderson"
By declaring (and optionally initializing) a variable like this in Global Code for
the form, it can be retrieved (and modified) by any program that runs in the
current form. When you exit the form, any static variables connected to it are
destroyed.
Is it possible to have the static variable change when a value on the form changes? Example: The form has two elements - Rate and LoanAmount. The static variable declared in the global section simply multiplies the Rate and LoanAmount to come up with simple annual interest. If a user changes the Rate or LoanAmount, I need the static variable to "recalculate."
I got this to work using a regular variable in the "on change" element but I need the variable to be as the Programming Guide says, "more persistent" and less "volatile and limited." Static variables sound like the perfect solution but my knowledge is too limited.