Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combining text boxes (or labels)

Status
Not open for further replies.

wxkeep

Programmer
Jul 5, 2005
57
US
In my database I have an opening screen - essentially a list of all the records in the database. It doesn't display all the data - obviously - just some of the key info - like an account number and a full name etc. Well, the name is split into three fields - first middle and last - but in my datasheet (continuous form) view of that data I have three text fields - one each bound to the first, middle and last name. So my list looks like this

93889453 Micky T Mouse
39872938 Ronald G Reagan

and I'd rather it look like

93889453 Micky T Mouse
29872938 Ronald G Reagan


How would I go about that do you suppose?
 
You simply need to concatenate the fields into one, i.e.

txtWholeName = txtFirstName & txtMiddleInit & txtLastName

Then on your opening screen use the txtWholeName.

Just fill in the actual names of the fields in your table.

Hope this helps!

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
So is that assigned via code? Or in the properties of the form or textbox in the form? Which do I use as the control source of the textbox in the design view of the datasheet form?

Also - a second and NEW question. Under each record there are subrecords... like so:

39842984729 Micky T Mouse
Acme Incorporated
Widgets R Us
20398420849 Ronald G Reagan
Some other company
02893402398 Another Customer
His project company
and another
and another

How do I design it to list those other sets of companies in my datasheet design?
 
One way would be to create a new Query that includes the fields you wish to display from both the Names table and the company name table.

In the Query you would create a displayed field such as:

FullName: [LastName] & " " & [FirstName] & " " & [MidInit]

Then build a form using this query and have it display the new concantenated 'full name' and the company info fields as you see fit.

hth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top