Solved: Access Manipulate data in a field

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Stang62

Thread Starter
Joined
May 6, 2010
Messages
16
Hi
Can someone help me to put a dash in the middle of 8 numbers on a number of records in a field in Access.
eg change 12345678 into 1234-5678 (each record in the field contains a unique number)

Thanks :)
 

Stang62

Thread Starter
Joined
May 6, 2010
Messages
16
The name of the field is "ISSN" as in international serial number for Journals. An ISSN usually has a dash in the middle of the 8 characters (usually all numbers except the last character may be a letter or a number) the data i have has all 8 characters with no dash.

hope this helps
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,612
Can't you just edit the field format in the table with a format like "9999-9999", (but then for all typres of chraracters)something like what is done with phonenumbers? You can in Excell, you type the 8 characters but the middle is always a dash.
 

OBP

Joined
Mar 8, 2005
Messages
19,895
Keebellah, that is one solution, but it means doing it for every form & Report as well.
The simplest way to update all the records is with an update query.
You create a normal Select query with just the ISSN field, then change the query to an "Update Query".
The update query adds a row call "Update To", in that row enter
left([ISSN],4) & "-" & Right([ISSN],4)
 

Stang62

Thread Starter
Joined
May 6, 2010
Messages
16
Thanks Keebellah and OBP for your replies. I tried the update query option from OBP and it did just exactly as I wanted it to do, so many thanks for your help :D
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top