Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 18th, 2004, 12:13 AM
Chrnos Chrnos is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 1 Chrnos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post Help Access VBA coding

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! =)

Reply With Quote
  #2  
Old April 26th, 2004, 03:41 PM
Slow2Code Slow2Code is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: B.C., Canada
Posts: 2 Slow2Code User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Help Access VBA coding


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT