Solved

How to have Phone # from Access appear as (###) ###-####

Posted on 2000-03-05
2
122 Views
Last Modified: 2010-05-02
I have a "seek" from which is loading data from access files into VB Labels and it appears as ##########. I want it to be (###)###-####.
What code will do this?

Thanks!

Dave
0
Comment
Question by:dtmaurer
2 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 50 total points
ID: 2585627
Dim sNumber As String
sNumber = "2125551212"
Label1.Caption = Format(sNumber, "(###) ###-####")
0
 

Author Comment

by:dtmaurer
ID: 2586358
Thanks!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SLMGR Switches Are Not Working On KMS Host 3 94
Can we place a tooltip on the actual vb6 form 5 42
Advice in Xamarin 21 79
backup program with robocopy 6 19
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question