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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Address Manipulation

Status
Not open for further replies.
Jul 24, 2000
11
0
0
US
Hello,

I have several thousand addresses in lowercase letters. What I would like to do is uppercase the first letter of each word (in other words, after every blank spot).

I am somewhat familiar with building queries (not too savvy with VBA) so if anyone has ideas on easily accomplishing this task, it would be much appreciated

Thanks,

Oren
 
You could use something like that:

Open a recordset in a form VB, cycle through the records and update data where X = CapitalizeFirst(X)then save and go to next record.

Function CapitalizeFirst(X)

' Make first letter in field uppercase; leave other letters as typed.
Dim Temp As String
Temp = Trim(X)
CapitalizeFirst = UCase(Left(Temp, 1)) & Mid(Temp, 2)

End Function
 
Use the StrConv function in an Update query.

Set your "Update To" value as

StrConv([YourAddressField], vbProperCase)

For more info on the StrConv function, read the Access (97) Help topic StrConv Function or the VBA Help topic StrConv Function (for A2K, A XP).


HTH
Lightning
 
Thanks guys,

I'm using Access 2000 -- the answer to my question ended up being StrConv([address],3) in an update query. It seems like in access2k you have to use a 1,2,or 3 instead of something like vbPropercase

Thanks for the help

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top