Microsoft Access Help

Discussion in 'OT Technology' started by P07r0457, Aug 6, 2006.

  1. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    Okay, trying to get something done quick & dirty in access. Eventually it'll be a .Net or PHP web application with a MySQL backend... but I need to done like yesterday, so I'm working late tonight to get it done in access.

    I need to store a phone number in a field. So far I have the data type as "text" with an input mask of:

    Code:
    !\(999") "000\-0000" x"99999;0;_
    I need to store the area code (optional) and the phone number (required) and the extension (optional). I would like it to not display the area code or extension if they are not present. However, thus far I get:

    Data: 123.1231234.
    Current Display: (123) 123-1234 x
    Desired Display: (123) 123-1234

    Data: .1231234.
    Current Display: () 123-1234 x
    Desired Display: 123-1234

    Data: 123.1231234.1234
    Current Display: (123) 123-1234 x1234
    Desired Display: (123) 123-1234 x1234

    Data: .1231234.1234
    Current Display: () 123-1234 x1234
    Desired Display: 123-1234 x1234


    Any ideas how I can do this?
     
  2. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    Another input mask problem. How can I insert a "variable-length" placeholder?

    I wish to use an input mask for the email address... where the "user" would be seperate from the "domain". The seperator would obviously be "@".
     
  3. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    You can't do it with an input mask. Most people will just put two fields with the additional extension (because you can't mask the x or the ()). I wouldn't make the area code optional either.

    So let them enter it however they want and then make a script to parse it.
     
  4. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    meh, I'll leave the input mask, then.
     

Share This Page