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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Join 2 Fields into 1 ??

Status
Not open for further replies.

LooneyToon

Technical User
Aug 12, 2002
17
IE
Anybody,
How do you join to field on a table to create 1 field with the data from the 2 fields in it ?

Nice one!
 
Do you want to do this temporarily, e.g. for a report, or permanently, i.e. dispense with the two fields and always have them as one field from now on?

Either way, you can use a query (A select query for a temporary situation or an update query for a permanent one). Have fun! :eek:)

Alex Middleton
 
Thanks Alex,
Its for a Form, that is based on a query.
I have a 1st Name and Surname field on the query, but on the form it looks rubbish, so I want to join them together so as it looks better on the form.
Would you still suggest the Update Query, or rather the Select Query ?

Cheers
Looney Toon
 
Sounds like you need a Select query, which I presume the one for your form already is. To combine fields, just add a new field in a blank column in the design grid, but do it manually rather than dragging from the list of fields in the table.

On the field line type something like:

Fullname: [1st Name] & " " & [Surname]

Then set the ControlSource property of the appropriate control on your form to 'Fullname'. This will show the name in the format 'John Smith'. You can use other formats, e.g.

Fullname: [Surname] & ", " & [1st Name] to show it in the format 'Smith, John' etc. BTW, you can call the field anything you like, it doesn't have to be 'Fullname'. Have fun! :eek:)

Alex Middleton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top