Results 1 to 6 of 6
  1. #1
    evanesce is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    3

    TextBox Question - Only two hyphens but not adjacent.

    Hi.


    I searched here and there but still can't find any clue for my question.
    I think it's a very simple one but for me, it's not. : (

    In the form, I want a textbox which allows only two hyphens, not adjacent.

    For example, 000-00--0000 would be wrong but 000-000-0000 would be OK

    How can I do this?
    Any help would be greatly appreciated.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    Text removed, it was meant for another thread!
    Last edited by R_Badger; 04-19-2012 at 01:44 AM. Reason: Removed, put it in the wrong thread!

  4. #4
    evanesce is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    3
    Thank you for your relply.
    I have a textbox which users will input cell phone numbers. (I live in South Korea.)
    If the numbers start with 011 or 019 or 017 or 018, its format would be 000-000-0000 or 000-0000-0000.
    Otherwise, the numbers are supposed to start with 010 and its format should be 0000-0000-0000
    I mean, I have to consider the number of digits.
    Is there anyway I can do that without using input masks??

  5. #5
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    What about multiple boxes for the input and code the string together and insert the hypens then?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    The input mask allows for an optional character entry as described in the link I referenced. Try: 0009-0009-0009;0;_
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Textbox Calculator
    By Randy in forum Access
    Replies: 10
    Last Post: 03-16-2019, 07:36 PM
  2. Replies: 17
    Last Post: 02-08-2012, 10:06 AM
  3. New to VBA - Textbox/ List question
    By dreamnauta in forum Programming
    Replies: 6
    Last Post: 12-21-2011, 01:41 PM
  4. Load textbox from another textbox
    By siddel77 in forum Programming
    Replies: 12
    Last Post: 08-30-2011, 01:46 PM
  5. using textbox with In () in query
    By TheShabz in forum Forms
    Replies: 4
    Last Post: 04-10-2010, 12:00 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