Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reset path database
Message
 
 
To
06/12/2001 07:34:01
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00590433
Message ID:
00591849
Views:
23
>Hi all,
>I want to reset the path where my database is stored.
>The application-object has the datapath stored to a property.
>The application-object is not public. I passes to the forms as a parameter.
>How can I acces this property from a Form load-event?
>I start my forms with oApp.doform("myform",with this")
>This methods contains a line like this "Do form ¶1 ¶2"

Hi Jim,

The parameters are passed to the form's Init event and the Load event wouldn't see them because it fires before Init. You can keep an reference to your application object in the property of the _SCREEN object. This way the Load of the form would have access to it and you don't have to pass it as a parameter to the form.
* In the main program
oApp = Createobject( ... )
_Screen.Addproperty("oApp", oApp)
...
* Load of the form
* Save to the form's property to use it later anywhere in the form w/o reference to the _screen
Thisform.oApp = _Screen.oApp
...
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform