1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access Manipulate data in a field

Discussion in 'Business Applications' started by Stang62, Jan 4, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. Stang62

    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 :)
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    I need to know the name of the Field.
     
  3. Stang62

    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
     
  4. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,592
    First Name:
    Hans
    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.
     
  5. OBP

    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)
     
  6. Stang62

    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
     
  7. Sponsor

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 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/972629

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice