PC Review


Reply
Thread Tools Rate Thread

Combining two fields in a table

 
 
Barry
Guest
Posts: n/a
 
      19th Feb 2010
I have a 5-digit zip field and a 4-digit plus-4 field. I created in my table
a 10 digit newzip field, so that combining these two make a 9-digit zip that
looks like this:
60016-2345. I have no problem creating this in a query, but I want this to
be in a table, and then I will delete the existing zip and the plus field,
then re-name the newzip as zip. How do I do this? Can I convert it from the
query into a table? I know this is basic, but I'm really new to this
--
Barry
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      19th Feb 2010
On Thu, 18 Feb 2010 17:28:01 -0800, Barry <(E-Mail Removed)>
wrote:

>I have a 5-digit zip field and a 4-digit plus-4 field. I created in my table
>a 10 digit newzip field, so that combining these two make a 9-digit zip that
>looks like this:
>60016-2345. I have no problem creating this in a query, but I want this to
>be in a table, and then I will delete the existing zip and the plus field,
>then re-name the newzip as zip. How do I do this? Can I convert it from the
>query into a table? I know this is basic, but I'm really new to this


I would suggest opening the table in design view and creating a new 10-byte
text field (ZipNew call it, perhaps).

Run an Update query updating it to

[Zip] & "-" & [Plus4]

If your fields are Number fields rather than Text, use

Format([Zip], "00000") & "-" & Format([Plus4], "0000")

using yor own fieldnames of course.

Check the data, open the table in design view, delete the old zip and plus4
fields and rename Zipnew to Zip; you will probably want to Compact the
database when you're done.

Do you need to allow for non-US postal codes, say from Canada? If so you may
want to check the size; Canadian postcodes are 6 or 7 characters (depending on
if you include the blank), other countries are quite variable.

--

John W. Vinson [MVP]
 
Reply With Quote
 
KARL DEWEY
Guest
Posts: n/a
 
      19th Feb 2010
You need an update query, so open in design view and pull down the new field
to the grid.
Click on the Update icon and the rows of the grid change to have one titled
'Update To:' in which you enter --
[Zip] &"-" & [Plus-4]

Run the query.

--
Build a little, test a little.


"Barry" wrote:

> I have a 5-digit zip field and a 4-digit plus-4 field. I created in my table
> a 10 digit newzip field, so that combining these two make a 9-digit zip that
> looks like this:
> 60016-2345. I have no problem creating this in a query, but I want this to
> be in a table, and then I will delete the existing zip and the plus field,
> then re-name the newzip as zip. How do I do this? Can I convert it from the
> query into a table? I know this is basic, but I'm really new to this
> --
> Barry

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
combining two or more table fields into a single table field sasquatchlgmt Microsoft Access 1 20th Feb 2009 04:58 AM
combining more than one table with the same fields in MS Access 20 Joe G Microsoft Access 3 12th Jun 2008 10:45 PM
combining fields on a pivot table asamoto.2@osu.edu Microsoft Excel Worksheet Functions 1 12th Jul 2006 12:53 AM
combining three fields of data into new field from one table =?Utf-8?B?a3ljX2ZpdGF2?= Microsoft Access Queries 1 21st Apr 2005 07:51 PM
Creating new table by combining fields from old =?Utf-8?B?cm95X3dhcmU=?= Microsoft Access 2 27th Dec 2004 09:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:42 PM.