Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Concantenate
Message
From
20/08/2004 15:19:15
 
 
To
20/08/2004 15:03:24
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00934985
Message ID:
00934994
Views:
29
Mildred,

Welcome to the UT!

Of course there is more than one way you can do this. You can drop an editBox on the form, and make it readonly in the property sheet. Probably should also set TABSTOP of the editBox to .f., and make the changes under the layout tab to make it look the way you want. SCROLLBARS to .f., for example.

Then in init method of form put something like the following. This assumes that company, addr1, etc. are variables that are in scope when the form loads (they really shouldn't be, unless you are creating those variables when the form loads). If they are field names in a table, you need to put the tablename in front of each one (for example, table1.company)
local crlf

crLf = chr(13)+chr(10)
thisform.edit1.Value = company + crlf + ;
                       addr1+ ", " addr2 + crlf + ;
                       alltrim(city) + ", " + state + " " + zip
You could also use textBoxes for each field, set them to readonly, and use the controlSource to point to fields in a table.

>I am trying to add a Unbound Text Box to a Foxpro Form. I would like to display the company's primary address by concantenating a couple of fields.
>
>Company
>addr1+","+addr2
>city+","+" "+state+" "+zip
>
>This is for displaying purposes only not for updating. It will be the header of a "FORM"
>
>Problem is I don't know how to do this. Please help!
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform