Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where do I put the code??
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00013033
Message ID:
00013215
Views:
34
>>>>It is stored to cUserName in my PUBLIC nonvisual application.
>>>>>In the portion of the code that you are setting the variable, you can just assign that value to the text field
>>>>> eg. ThisForm.txt_MyTextBox.value = This.cUserName
>>>>I have tried this with no luck. this.cUserName displays it as well as oApp.cUserName. The value is out there, I'm just having difficulty assigning the value to display in my textbox.

It sounds like the problem is your use of "This" to reference your application object. If you are calling from within a method in your form, "This" will reference the parent control for the method where that code is written. Try it this way.

In the Init method of the text box, put:

This.Value = oApp.cUserName

From within the form, you have to specify the name of your application object. If you need to put the code in some other control, then use "ThisForm.txt_MyTextBox.Vaue" instead of "This.Value".

Hope that helps.

Mark
=========================
Mark A. Peter
Los Angeles, CA
mpeter@primenet.com
=========================
Previous
Reply
Map
View

Click here to load this message in the networking platform