Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2007

    Insert Dash between set of Numbers

    I am a newbie to VBA, can someone tell me how to insert a dash in between a set of Numbers? Example 12345678 I want to turn into 12345-678

  2. #2
    acehowell is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2007

    Reply to above

    You can go to the form, click on the box that you want to alter, go into properties, and then input mask. From there click on the three dots to the side and click on edit list if there is not a already a mask that would work for you. once you click on edit list click new at bottom, and fill in description, on the input mask section type and example of what you are wanting, such as 00000-000 make _ as the placeholder, and then type in 12345-678 under example hit close then try it, if thats what you want then hit next twice, and select with symbols in mask, hit next again then finish. Go back to form and try it out. Hope this helps.

  3. #3
    Join Date
    Apr 2007
    Portsmouth, VA
    In VBA, you can use the format command to make such a conversion.

    format (12345678, "#####-###")

    will return 12345-678

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Non programer needs help in decimal numbers
    By Peter O in forum Access
    Replies: 1
    Last Post: 10-07-2008, 12:29 PM
  2. Syntax Error In Insert Into Statement
    By frankvfox in forum Queries
    Replies: 1
    Last Post: 09-09-2008, 12:35 PM
  3. Avoid jump to first data after insert new picture
    By gigolomoden in forum Programming
    Replies: 0
    Last Post: 08-04-2008, 10:08 PM
  4. Updating two tables using SQL Insert Into
    By glazzaro in forum Programming
    Replies: 0
    Last Post: 05-02-2008, 10:52 PM
  5. When Week Numbers Collide!
    By Schwagr in forum Queries
    Replies: 3
    Last Post: 03-18-2006, 10:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Other Forums: Microsoft Office Forums