Microsoft KB Archive/138999

= How to Display Concatenated Fields in a Text Box =

Article ID: 138999

Article Last Modified on 2/11/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q138999



SUMMARY
A text box on a form can display concatenated values from multiple fields. This can be accomplished by putting an expression in the Refresh method of the text box. Both the ControlSource and Value properties of the text box should be left blank and the ReadOnly property should be set to True (.T.).



Step-by-Step Example
To demonstrate how a text box can display concatenated values, follow these steps:

 Create a new form. Add the Customer table to the Data Environment. Using the form Controls toolbar, place a text box on the form.  In the text box Refresh method, type the following: This.Value = ALLTRIM(Customer.City) + ", " + ; ALLTRIM(Customer.Country)  Ensure that the text box ControlSource and Value properties are blank. Change the ReadOnly property to True (.T.).  Add a command button to the form, and place the following two lines in its Click event: SKIP THISFORM.Refresh  Run the form, and press the command button to observe the values in the text box.</li></ol>

Additional query words: VFoxWin

Keywords: KB138999

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.