|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have some problem in figuring out how to code the following:
1. Remove any spaces, brackets or dashes from a telephone number. 2. Change the Title, First name and surname of each record Lowercase with the first letter of each word in each of the 3 fields to Upper Case. eg: MR JOHN SMITH becomes Mr John Smith. I have attempt to do this, however with no success! Please help! =) |
|
#2
|
|||
|
|||
|
Code:
Public Sub testit() Dim strPhone As String, strAllNums As String, intJ As Integer, intN As Integer strPhone = "(555)111- 2222" strAllNums = "" For intJ = 1 To Len(strPhone) intN = Asc(Mid$(strPhone, intJ, 1)) If intN > 47 And intN < 58 Then strAllNums = strAllNums & Chr(intN) Next Debug.Print strAllNums End Sub For your second one google with: VB code proper case function and you will find some good examples. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Help Access VBA coding |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|