Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do i reference a spawned form? - VFP6, SP3
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
How do i reference a spawned form? - VFP6, SP3
Miscellaneous
Thread ID:
00244776
Message ID:
00244776
Views:
39
I have an application where I need to do the following:

There is a grid on the form. If a user double clicks a particular cell, I would like to show a small detail form off to one side.
In the doubleclick event of the cell, I have a line that says
do clkview with this.value, where clkview is the form I want to spawn.

Now needless to say, if it exists, the form should be updatable by passing the value to the property on the clkview form that stores the value passed.

Therefore I thought I could reference the form with
clkview.value=this.value
clkv.refreshit

Where value = stored value, and refreshit= routine to requery and refresh it.

However what happens, is the object reference does not get created and I cannot reference it this and it spawns another form when the user doulbeclicks. Needless to say this is confussing having all of these windows open, when only one is valid.

The actual doubleclick code snippet is below:

if type('clkview')=='O' and clkview!=.null.
clkview.tclock=this.value
clkview.viewrefresh
clkview.activate
else
do form clkview with this.value
endif

What am I missing?

TIA,

Mike
Next
Reply
Map
View

Click here to load this message in the networking platform