Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Erik Gomez
  Where is Erik Gomez?
 Victorias City, Negros Occidental
 Philippines
 Erik Gomez
 To: Christian Tabligan
  Where is Christian Tabligan?
 Bacolod City, Neg. Occ.
 Philippines
 Christian Tabligan
 Tags
Subject: RE: Loading error...THISFORM cannot be use within a method
Thread ID: 78462 Message ID: 78475 # Views: 1 # Ratings: 1
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Tuesday, October 04, 2005 9:58:35 AM         
   


> Hi,
> I have encountered a problem everytime I used to run my form with data environment. The messagebox appears like "Error in loading...THISFORM cannot be use within a method".
>
> Hoping for your reply...
>
> Christian Tabligan
> CSA-B, Student
>
> Visual FoxPro is like a game...need to explore until you reach your goal to success!!!

hi,
THISFORM can only be used within a form or form class. if you what to access the form's methods or properties, you must get the reference object to the form. you can try:
Do Form myForm Name oForm

but not sure if the "Name" keyword is available in VFP6. another way is put this in the init event:
* init event of form
Public goForm
goForm = T

then in your prg or anywhere else in your app, goForm will have the reference the desired form.
note that this is just to give you an idea you may need to do some more "work" in order to make it work in your existing app.
hth,
Erik Gomez
www.foxite.com - The Home of The Visual FoxPro Experts
Personal Weblog

ENTIRE THREAD

Loading error...THISFORM cannot be use within a method Posted by Christian Tabligan @ 10/4/2005 6:15:44 AM
RE: Loading error...THISFORM cannot be use within a method Posted by Boudewijn Lutgerink @ 10/4/2005 9:48:46 AM
RE: Loading error...THISFORM cannot be use within a method Posted by Erik Gomez @ 10/4/2005 9:58:35 AM
RE: Loading error...THISFORM cannot be use within a method Posted by Christian Tabligan @ 10/4/2005 11:15:31 AM
RE: Loading error...THISFORM cannot be use within a method Posted by Erik Gomez @ 10/4/2005 11:46:36 AM
RE: Loading error...THISFORM cannot be use within a method Posted by Andy Kramek @ 10/4/2005 1:42:58 PM
RE: Loading error...THISFORM cannot be use within a method Posted by Scott Malinowski @ 10/4/2005 6:05:29 PM
RE: Loading error...THISFORM cannot be use within a method Posted by Christian Tabligan @ 10/5/2005 7:06:24 AM
RE: Loading error...THISFORM cannot be use within a method Posted by Andy Kramek @ 10/5/2005 12:29:26 PM
RE: Loading error...THISFORM cannot be use within a method Posted by Erik Gomez @ 10/5/2005 12:53:08 PM