Subject Re: public variable getting lost
From Ken Mayer <>
Date Sun, 22 Apr 2018 21:19:55 -0700
Newsgroups dbase.getting-started

On 4/22/2018 8:03 PM, ed furche wrote:
> I have a public variable CLKHOURS.   i can look at it after I declare it,  when I first open the app.  It has a zero just as i Initialized it.
> When I proceed to the next WFM, where I use it to accumulate a quantity,  and then look at it,  is is blank.
> Example:   from the command window  I enter ?CLKHOURS.  I has no value...
> Obviously,  the reason I am concerned, is that the number I stored in it, is not put into the  DBF record...
> I am using dBase 9 because dBase 11 doesnt play well with Crystal.

First off, don't use public variables. Instead, if this is something you
need available across the application:

_app.ClkHours = 0

Public variables are problematic, because you can easily accidentally
overwrite them, and so on.


*Ken Mayer*
Ken's dBASE Page:
The dUFLP:
dBASE Books:
dBASE Tutorial: