Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make Memory variables use Private Data Sessions
Message
From
12/11/2001 17:44:28
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00580254
Message ID:
00580658
Views:
38
>Could you give me some pointers as to how forms could be fixed automatically.... i Dont want you to write the code but a few pointers would be helpful !!!

First of all, you need to create a list of every form that needs to be changed. Hopefully, you can just do an ADIR(aSelObj, 'source\*.scx') or something similar.

Then, run through the array, and do something like (stress "like"):
modify form laForms[lnI, 1] nowait

aselobj(aForm)

* use the aform[1] object and scan through every child object, looking for a controlsource property, and setting it appriatly.
for each loControl in aForm[1].controls
   loControl.controlsource = 'thisform.oRecord.' + strtran(loControl.ControlSource), 'm.', '')
endfor

* Use the keyboard to save the form
keyboard '{CTRL+W}'
Shoudl make quick work of your forms (you might want to back them all up first :-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform