Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving and restoring data environments - and variables
Message
From
02/01/2007 18:30:37
 
 
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:
01181625
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?
>
>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?
>
>Thanks very much!
>
>John

If you don't mind VERY old-fashioned ways of doing things then you might check out the CREATE VIEW and SET VIEW commands for saving/restoring the table settings (and some other things). They go back to (at least) FPW2.6 and were still supported in VFP 8 (I don't have 9 so I can't say for certain it still exists). You could also check out SAVE TO and RESTORE from to get the last state of any variables.

There are obviously better ways of doing it but this might be the easiest and quickest to implement. Bear in mind, however, that the next person to support this application will probably give a hugh "UGH" when s/he sees it.

Good luck.........Rich (AKA the dinosaur)
Previous
Reply
Map
View

Click here to load this message in the networking platform