Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving and restoring data environments - and variables
Message
From
03/01/2007 13:33:38
 
 
To
02/01/2007 14:25:54
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01181518
Message ID:
01181903
Views:
16
>Hi all,
>
>In this project I'm working on, my users wanna be able to have several forms open at once. For example, if they're in the Finished Goods form, they may wanna open up the Customers form. If I open the Customers form and then close it, when I return to the Finished Goods form, the tables are closed.
>
>What do I need to do to save the current environment when opening another form on top of one that's already open so I don't lose those open tables?
>I've looked at a number of things in the Help, but nothing I try seems to work. Are there any particular settings I need to look into?

Use private data sessions. That way, each form has the tables it needs and can't step on other forms.

Even with private data sessions, you can open all tables at the beginning of an application, as Edward suggested; that will speed form opening. However, unless you're dealing with a pretty slow network or a lot of tables in each form, it probably won't make a big difference.

>Also, I have two variables I use in each form to keep track of whether or not I'm in adding mode or edit mode. They're called Adding and Editing.
>When I open that second form then close it to return to the first form (which is still open), I lose Adding and Editing since I release them when closing each form. I've looked into Public, Private and Local, but am not seeing the proper way to keep my Adding and Editing variables alive and unique to each form I have open. What do I need to look for there?
>

Use form properties. To add a property to a form, choose Form | New Property from the menu. In this case, I'd add them to the form class on which your forms are based.

Tamar

P.S. Where's Monroeville? We have a Visual FoxPro user group that meets in suburban Philadelphia. Next meeting is next Wednesday night (the 10th).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform