Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ActiveForm is not an object
Message
From
18/12/1999 12:32:14
 
 
To
18/12/1999 11:17:33
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00305647
Message ID:
00305670
Views:
23
>Hi,
> I have a top level form and multiple MDI form. I place toolbar on my top level form and issue _SCREEN.ACTIVEFORM.mymethod(). It works most of the time, but VFP give error ACTIVEFORM is not an Object sometime... why does it happen? hor to solve?
>
>Thank you

Sometimes, there is no ActiveForm at that time. It's safer to look for the form you really need, and use its reference to call the method, e.g.
For Each oForm in _SCREEN.Forms
 If oForm.Name=="MyForm"
  oForm.mymethod()
  Exit
 Endif
Endfor
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform