A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how to combine 2 fields: i.e. (house# + street)=(new)address



 
 
Thread Tools Display Modes
  #1  
Old October 30th, 2008, 07:00 AM posted to microsoft.public.access
jimo
external usenet poster
 
Posts: 14
Default how to combine 2 fields: i.e. (house# + street)=(new)address

I have two fields:1 # (numeric), & Street (text). How can I combine them
into a new field, Address?
  #2  
Old October 30th, 2008, 08:25 AM posted to microsoft.public.access
Allen Browne
external usenet poster
 
Posts: 11,706
Default how to combine 2 fields: i.e. (house# + street)=(new)address

"JimO" wrote in message
...
I have two fields:1 # (numeric), & Street (text). How can I combine
them into a new field, Address?


Create a query.

Type this into a fresh column in the Field row:
FullAddress: Trim([F1] & " " & [F2])
substituting your field names for F1 and F2.

You should not store this into a new field in your table, unless there could
be valid reasons why the full address should *not* be the same as the
concatenation of the 2 fields. If you do need to so this, use an Update
query (Update on Query menu) to update the Address field to the expression
above.

More info in:
Calculated fields
at:
http://allenbrowne.com/casu-14.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

  #3  
Old October 30th, 2008, 08:29 AM posted to microsoft.public.access
Allan Murphy
external usenet poster
 
Posts: 63
Default how to combine 2 fields: i.e. (house# + street)=(new)address


Try House_address = [house_number] & " " & [street]
Where house_number is the numeric number of the house.

Allan

"JimO" wrote in message
...
I have two fields:1 # (numeric), & Street (text). How can I combine them
into a new field, Address?



  #4  
Old October 31st, 2008, 08:02 AM posted to microsoft.public.access
jimo
external usenet poster
 
Posts: 14
Default how to combine 2 fields: i.e. (house# + street)=(new)address

Thank you Allen!

"Allen Browne" wrote:

"JimO" wrote in message
...
I have two fields:1 # (numeric), & Street (text). How can I combine
them into a new field, Address?


Create a query.

Type this into a fresh column in the Field row:
FullAddress: Trim([F1] & " " & [F2])
substituting your field names for F1 and F2.

You should not store this into a new field in your table, unless there could
be valid reasons why the full address should *not* be the same as the
concatenation of the 2 fields. If you do need to so this, use an Update
query (Update on Query menu) to update the Address field to the expression
above.

More info in:
Calculated fields
at:
http://allenbrowne.com/casu-14.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


  #5  
Old October 31st, 2008, 08:03 AM posted to microsoft.public.access
jimo
external usenet poster
 
Posts: 14
Default how to combine 2 fields: i.e. (house# + street)=(new)address


Thank you Allan!
"Allan Murphy" wrote:


Try House_address = [house_number] & " " & [street]
Where house_number is the numeric number of the house.

Allan

"JimO" wrote in message
...
I have two fields:1 # (numeric), & Street (text). How can I combine them
into a new field, Address?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:10 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.