Solved

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

Posted on 2000-03-05
2
120 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now