Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web page in Access with Telephone Number field format

Status
Not open for further replies.

dwight1

IS-IT--Management
Aug 22, 2005
176
US
Hi,

I am trying to have a field on the web pages (html) of access with an input mask of a phone number. Example xxx-xxx-xxxx or any other format on the page.

I am able to do this in the table field with
!\(000") "000\-0000;;# as an input mask. But how do i make the same or anyother format to be on the page field (visible to the final user).

Any suggestions are highly appreciated.

Thank you
 
!\(000") "000\-0000;;# is an Input Mask, as you know. It's just a mask. The second position, between the ;; you have blank which means DO NOT store special characters such as () and -. Place a zero there and your DAP will look the way you want. So,
!\(000") "000\-0000;0;#
 
Thank it did definitely help. It is now able to accept signs such as () and -.

But i want the DAP form field also to reflect in the following format as the cursor is on the said field or when the form is opened so that the final user would know that it is a telephone field with the format.

For example:
when the cursor is on the field or when the user enter the following number 6607508660 it should show it on the DAP as 660-750-8660. Now with ur suggestion the user have to enter - or (). I want to avoid that.

THANK YOU FOR YOUR HELP.

dwight
 
Yeah. I see what you mean. My way only displays the data already in the table in the phone format. So, let's go to Microsoft's site. I found this. It shows how to set up various masks including one for the phone number.

ACC2000: Data Access Page Ignores Underlying Table's Input Mask


They don't make anything easy, do they?
 
Thank you.

That is exactly i wanted.

Have a good weekend.

 
BTW, never worked with DAP, but in standard Access form you need to be aware when using an input mask that if the user clicks on the field instead of tabbing to it, the cursor inserts at wherever the cursor was, not at the beginning of the field. This can cause problems if the user doesn't realize it's happened. In straight Access, this is solved by adding code in the on click proceedure of the text box to move the cursor to the start of the field. Maybe the same works in DAP.

Code:
Private Sub PhoneNumberField_Click()
    PhoneNumberField.SelStart = 0
End Sub

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top