Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which came first, Chicken or Egg
Message
From
05/10/2005 20:31:32
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
05/10/2005 16:55:43
Joel Hokanson
Services Integration Group
Bellaire, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01056465
Message ID:
01056556
Views:
27
>The reason I am doing ths is to color code the text boxes and command button based on the values in the databse. For example command3 might be red because there is not value in M.some_field.

You can do the same with alias.some_field. You don't really need memvars for this.

>What is strange is that I went to the first item after the form in the properties list (text1). I did my scatter memvar there, but the very next item (text2) did NOT see the value of the memvar. It is like there is some sort of clear after the text box is initiated???

Yes, implicit - your variables are private to the method which created them, and unless they were public or at least private to the code which created the whole form, will cease to exist as soon as this method exits. So, in your case, their life ends as soon as your textbox.init exits.

But, as I said, you don't really need those memvars at all. Just replace the m. with the actual alias of the table from which you create these variables, and that's it.

Now if you don't want the direct binding of your code to the fields in the table - perhaps you want to persist them for a while, regardless of what their current values are, there are ways to do that too.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform