Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form is there...but isn't there?
Message
 
 
To
14/07/2003 13:49:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00809913
Message ID:
00809937
Views:
32
Christopher,

Sounds like you are using a name dependent object reference. When done from the command window:

do form profile

you actually create a global memvar named profile which holds an object reference to the form. When run from the other form no such memvar is created.

Where are you trying to do something like access profile.SomeObject?

All the code in a form should use the nameless references like this, thisform and this.parent.

Is your listing form trying to access the profile form?

Contrary to what Grigore has suggested you should not use PUBLIC memvars in your application for this sort of thing because it hampers your ability to run multiple instances of forms.

>I have a form (main.scx)....with a button on it...when this button is clicked, another form appears (listing.scx) with a listbox on it. When a record in the listbox is double clicked, the listing form closes and another form appears (profile.scx). This form has two pageframes on it; when the 'tab' of one pageframe (details) is pressed, the code switches the focus to a tab on the other pageframe (actions).
>
>The 'profile' form works fine if it is called alone. However, if it is called thru the process I describe, and I click on the tab to change the other pageframe(details) I get an error saying 'profile is not an object'. Yet it has already displayed the form!
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform