>
> >>>>>I have a text box that is disabled and I wish it to display the contents of a memory variable. With debug window open and this.cUserName displays the contents, but I cannot figure out where to put the code to make it display in the text box. Tried *=this.cUserName* in the value but no go, also tried it in the control source, init of the form...etc. Any ideas?
> >>>>Where are you setting the variable?
> >>>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.
>
> >>Normally it's enough to issue:
> >>thisform.YourTxtBox.value=cVariable
>
> Where should I issue this???
>
> >>If it doesn't work I would recommend to check ControlsSource (make it empty), InputMask and/or Format properties.
>
> It is!
>
> >Most likely controlsource is the culprit. what does the object show?
>
> Confused!
> JP
You could put it in the controlsource, but you would have issue a
refresh on form level or of the object in questiion, since by definition
it does not have the focus.
HTH,
Marc
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.