Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mesage ActiveForm is not an object
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00818610
Message ID:
00818618
Views:
13
THre're a couple of ways.
IF TYPE("_Screen.ActiveForm") = O AND NOT ISNULL(_Screen.ActiveForm)
...
* OR 
IF TYPE("_Screen.ActiveForm.Name") = "C"
...
>Hi.
>I have code in a Gotfocus of a control which does a Do MyF4Key
>
>and in MYF4Key.prg have followng code:
>
>If Pemstatus(_Screen.ActiveForm.ActiveControl,'ShowlookupWindow',5) = .T.
> _Screen.ActiveForm.ActiveControl.ShowLookupWindow
>Endif
>
>This code is sued to run a Lookup piece of code.
>
>However, I am getting the message :
> ActiveControl is not an object if I hit the F4 key after selecting the screen to run . but just before it becomes visible. (My control is the first control on the screen)
>
>
>It seems that if the Form is not actually active at the time I hit the F4 key, the message comes up.
>
>Is there any way of testing to see if ActiveForm is an object , so I can avoid running the above code.
>
>Regards,
>
>Gerard
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform