Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a VFP function to...
Message
 
To
28/06/2006 15:09:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01132372
Message ID:
01132551
Views:
18
And I post my answer before I read all other messages. I just login and click on Reply :o))) If you see my message now it contains just [Ignore that] :o)))))))))))))))))))

>>>>
>>>>LOCAL lcControl
>>>>lcControl = IIF(UPPER(LEFT(Object.ControlSource,2)) == [M.],SUSBTR(Object.ControlSource,3),Object.ControlSource)
>>>>DO CASE
>>>>   CASE TYPE([m.]+lcControl) == [U] AND; && Not a memory variable
>>>>        TYPE(lcControl)      #  [U]
>>>>        REPLACE (lcControl) WITH WITH ltNewDateTime
>>>>   CASE TYPE(lcControl)      == [C] && Memory variable
>>>>        STORE ltNewDateTime TO (lcControl)
>>>>OTHERWISE
>>>>        *** something wrong
>>>>ENDCASE
>>>>
>>>>(not tested for all occasions)
>>>
>>>I guess you ment to use VARTYPE() and not TYPE(), with TYPE() you must enclose the variable names with apostrophs. (I know that you know that!)
>>
>>No must use type, becuase Object.ControlSource is character,
>>Something like:
>>Object.ControlSource = [m.MyVariable]
>>or
>>Object.ControlSource = [MyTable.MyField]
>>If I use VARTYPE() it always will return - [C] when TYPE() will return the actual type of MyVariable or MyField :o))
>
>Yes, I saw it afterwards, I simply overlooked the first line with the ControlSource expression.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform