Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
THISFORMSET error
Message
From
17/08/2009 11:29:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
THISFORMSET error
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01418477
Message ID:
01418477
Views:
119
I have an application that is giving me a strange error. I have a form set that collects demographic information with a separate form in the set that collects that name and AKA's of the individual.

If I open the form set and then open the name form, then close the name form (nameform.visible=.F.; parentform.visble=.T.) and then close the parent form, therefore closing the formset, I get an "THISFORMSET can only be use within a method" error. When I track the error, I have an error log being written to, the program and line of code it says is causing the error is either a SQL Select statement that has no relationship to any form in the formset, any object on any of the forms, or any properties in any ot the forms or it ists my READ EVENTS line of code as the error causing code. The SQL statement is selecting form tables in a separate database that are used to set the menu pad and bars for security purposes and is in a separate program (.prg) that is listed in the SET PROCEDURES TO statement.

The code that calls the menu security procedure is in a method on the forms in the form set and is inherited back a couple of levels. This same code runs in other applications where the forms are not in a set.

This same error will sometimes occur if I try to add a name and either save the record or cancel theadd procedure, usually given the SQL statement as the line of code with the error. Both a save or a cancal would eventually run the method which calls the menu security.

Any idea why VFP seems to be holding onto the object reference to the formset and wants to use it where it is not even being mentioned.

Thanks,
Steve
Next
Reply
Map
View

Click here to load this message in the networking platform