If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
input mask for phone number
I am making an input mask for a phone number. sometimes i don't want to
include an area code. the information on help says: Examples of input masks The examples in the following table demonstrate some ways that you can use input masks. This input mask Provides this type of value Notes (000) 000-0000 (206) 555-0199 In this case, you must must enter an area code because that section of the mask (000, enclosed in parentheses) uses the 0 placeholder. (999) 000-0000! (206) 555-0199 ( ) 555-0199 In this case, the area code section uses the 9 placeholder, so area codes are optional. Also, the exclamation point (!) causes the mask to fill in from left to right. However when i try it with or without the !, the field fills in from the left. Unless I type [space],[space],[space], then the 7-digit number it will not accept it. |
#2
|
|||
|
|||
input mask for phone number
I don't use input masks for phone numbers or zip codes. Why? If you ever have
to do business with someone out of the USA or Canada, the phone number won't fit. For zipcodes it's even worse as Canada, and the rest of the world, have a much different postal code addressing system. If it's causing you grief, you might consider just not doing an input mask. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Steve2788" wrote: I am making an input mask for a phone number. sometimes i don't want to include an area code. the information on help says: Examples of input masks The examples in the following table demonstrate some ways that you can use input masks. This input mask Provides this type of value Notes (000) 000-0000 (206) 555-0199 In this case, you must must enter an area code because that section of the mask (000, enclosed in parentheses) uses the 0 placeholder. (999) 000-0000! (206) 555-0199 ( ) 555-0199 In this case, the area code section uses the 9 placeholder, so area codes are optional. Also, the exclamation point (!) causes the mask to fill in from left to right. However when i try it with or without the !, the field fills in from the left. Unless I type [space],[space],[space], then the 7-digit number it will not accept it. |
#3
|
|||
|
|||
input mask for phone number
Steve,
As Jerry says, input masks are not a good idea unless you plan on sticking with the US only. If you are trying to 'force' consistent data entry you might want to consider writing some validation code. Untested... If [ZipCode] = DLookUp("ZipCode",'TableWithUSZipCodes","ZipCode ='" & Me![ZipCode] & "'") Then Me.YourZipCodeField = Me.YourZipCodeField.InputMask = "00000-9999" End If Not an easy thing to do with phone numbers but perhaps you could 'force' an input mask based on whether the zip is US or not. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Jerry Whittle" wrote in message ... I don't use input masks for phone numbers or zip codes. Why? If you ever have to do business with someone out of the USA or Canada, the phone number won't fit. For zipcodes it's even worse as Canada, and the rest of the world, have a much different postal code addressing system. If it's causing you grief, you might consider just not doing an input mask. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Steve2788" wrote: I am making an input mask for a phone number. sometimes i don't want to include an area code. the information on help says: Examples of input masks The examples in the following table demonstrate some ways that you can use input masks. This input mask Provides this type of value Notes (000) 000-0000 (206) 555-0199 In this case, you must must enter an area code because that section of the mask (000, enclosed in parentheses) uses the 0 placeholder. (999) 000-0000! (206) 555-0199 ( ) 555-0199 In this case, the area code section uses the 9 placeholder, so area codes are optional. Also, the exclamation point (!) causes the mask to fill in from left to right. However when i try it with or without the !, the field fills in from the left. Unless I type [space],[space],[space], then the 7-digit number it will not accept it. |
Thread Tools | |
Display Modes | |
|
|