>The idea of this little function is to display status messages as my routine progresses.
>
>I keep it in my procedure library.
>
>If it finds a field on the active form called qmess it is supposed to update it and show it.
>
>It works fine if I step through the code, but when I don't step through the code nothing at all displays in the field qmess (not even the default wait message)
>
>It is being called by a program called RASDIAL() which is in turn being called by an event on my form.
>
>I can do things in a different way but this is very handy for me. (if I can make it work)
>
>
>
>*[99
>* OVERVIEW of QMESS
>* uses wait window to print a quick message on the screen
>* converts any tilde ~ characters it finds to chr(13)
>* to help with formatting the output
>* If there is a text field on the active form called qmess it will
>* output to that field instead
>*]99
>
> Func qmess
> Param lcMessage
> lcMessage=STRTRAN(lcMessage,'~ ','~')
> lcMessage=STRTRAN(lcMessage,'~',CHR(13))
> If type('_screen.activeform.qmess')='O'
> _Screen.activeform.qmess.value=lcMessage
> _Screen.activeform.qmess.refresh
> Else
> Wait WINDOW lcMessage NOWAIT
> Endif
> Return .T.
>
>
Mark,
I don't know if this will help, but is there an ActiveX control present on the form? If so, _SCREEN.ActiveForm will hold an object reference to that rather than the form. I'd add a check for NOT ISNULL(_SCREEN.ActiveForm). While it
shouldn't be necessary since the TYPE() function
should return "U", it won't hurt.
George
Ubi caritas et amor, deus ibi est