Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2011
    Posts
    1

    Unanswered: Input mask, home number, microsoft access

    COLOR="Magenta"]i do not know the input mask to enter for a home number on microsoft access starting with 0208 330 5199 and 01372 81765 can anyone help me? [/COLOR][/COLOR]

  2. #2
    Join Date
    Sep 2011
    Posts
    1

    Input masks codes, home number, microsoft access

    Help!!

    I don't know how to set the input mask for a home telephone number starting with (0208) 879 0987 as well as (01732) 123456! Please someone help!

    Thanks

  3. #3
    Join Date
    Sep 2011
    Posts
    3

    Exclamation Input Masks for Microsoft Access 2007

    Hi,

    HELP ME PLEEAASSEE!

    I need some help with telephone number input masks for Microsoft Access 2007

    I want it to appear like this:

    (0208)644-792
    (01732)739476

    Thanks

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    threads merged
    all 3 come from the same (school) domain
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Search for InputMask in Access help.
    Have a nice day!

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Im not sure its possible to do this using a format mask in Access, however you could do this by formatting using a function in VBA

    eg
    Code:
    private function FormatUKPhoneNumber(PhoneNumber as string) as string
    FormatUKPhoneNumber = PhoneNumber 'set up our default return state
    'first lets assume the worst and strip out any existing punctuation
    PhoneNumber = replace(PhoneNumber," ","") 'strip out any spaces in the supplied data.....
    PhoneNumber = replace(PhoneNumber,"(","") 
    PhoneNumber = replace(PhoneNumber,")","") 
    PhoneNumber = replace(PhoneNumber,"+","")
    if not isnumber(PhoneNumber) then 'the supplied number has some other invalid characters
    'can't be arsed to find out what it is just pump back what was supplied
    else
      'a uk phonenumber has 11 digits
      if length (phonenumber) <>11 then
        'hokay options are 'it can be 10 digits if the leading 0 is supressed
        'all UK numbers start 0x where x is a digit 1..9
        if left(PhoneNumber <> "0") then
          FormatUKPhoneNumber = FormatUKPhoneNumber(PhoneNumber)
        else ' pump back what was supplied
        endif
      endif
      if left(ThisPhoneNumber,2) = "02" then
        FormatUKPhoneNumber = "(" & left(ThisPhoneNumber,3) & ") " & mid(ThisPhoneNumber, 3,4) & " " & right(ThisPhoneNumber,6)
    else 'then its a simple number std code (5 digits) + 6 digits
        FormatUKPhoneNumber = "(" & left(ThisPhoneNumber,5) & ") " & right(ThisPhoneNumber,6)
      endif
    endif
    end function
    I'd rather be riding on the Tiger 800 or the Norton

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •