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
Time is a wonderful teacher. Unfortunately it kills all of its students.