General information
Category:
Coding, syntax & commands
Title:
Mesage ActiveForm is not an object
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only