Tech Support Guy banner
Status
Not open for further replies.
1 - 6 of 6 Posts

· Registered
Joined
·
16 Posts
Discussion Starter · #1 ·
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 :)
 

· Registered
Joined
·
16 Posts
Discussion Starter · #3 ·
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
 

· Trusted Advisor
Joined
·
6,932 Posts
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.
 

· Registered
Joined
·
19,932 Posts
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)
 

· Registered
Joined
·
16 Posts
Discussion Starter · #6 ·
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
 
1 - 6 of 6 Posts
Status
Not open for further replies.
Top