Hi Aaron,
Global variables are available to all procedures in all modules in your
project. Their values are maintained until changed by code, the app stops
running or the project is reset.
To clear them, therefore you will need to do something like:
gstrMyGlobalStringVariable = ""
gintMyGlobalIntegerVariable = 0
......
If you need to clear the variables every time a particular procedure runs
(my understanding of your question), then I think it's likely you don't
really want global variables. Local variables (defined in a certain
procedure) are automatically cleared when the procedure finishes.
Hope this helps,
Alex.
"Aaron Reid" wrote:
> I have eight different global variables that make calculations based on
> information on the underlying form. I need these variables to empty and
> recalcuate (variable1 - varibale2) as the information on the form changes.
> My code works as it should but keeps the previous data when doing the new
> calculation.
>
> How to I clear all the variables?
>
>
> .
>
|