Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a VFP function to...
Message
From
28/06/2006 15:17:15
 
 
To
28/06/2006 11:01:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01132372
Message ID:
01132554
Views:
7
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
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform