You need < pre > and < /pre > tags (without the spaces) around your code to keep the formatting. I've added them to your code below.
>I think I found a way to do it by creating a function called OBJTYPE() using TRY...CATCH:
>
>FUNCTION OBJTYPE
>LPARAMETERS tcControlSource
>LOCAL lnSelect, lcRetVal
>lnSelect = SELECT()
>lcRetVal = ''
>IF VARTYPE(tcControlSource) # 'C' .OR. EMPTY(tcControlSource) .OR. VARTYPE(&tcControlSource) = 'U'
> RETURN lcRetVal
>ENDIF
>TRY
> SELECT (tcControlSource)
> lcRetVal = 'C'
>CATCH
> lcRetVal = 'M'
>ENDTRY
>SELECT (lnSelect)
>RETURN lcRetVal
>
>
>Sorry about the formatting, but I prefaced the code inside the IF statement with four spaces but for some reason they were deleted before the message is sent...
>
>Thanks!
>Jim