Help Preserving the Character Case of a string...

C

CES

All,
I've run into a problem with a Field that I am passing a string value to via a module. I have a very specific case structure that I would like to preserve. Basically, the first letter of the First Name is capitalized First letter of the Middle Name is capitalized, and if Last Name is proper case.

IE: BTJohns, CESmith etc.

The problem that I am running into is that VBScript will sometimes convert the string that is returned from the function into what would be the equivalent of StrConv("XXX", vbProperCase):

So that the functions returned value "BTJohns" is converted into "Btjohns" and "CESmith" is converted into "Cesmith".

There seems to be no rhyme or reason as to when VBScript will impose this format change.

Any suggestions on this would be greatly appreciated. Thanks in advance. - CES
 
P

Peter Yang [MSFT]

Hello,

I understand that you have a VBA function that sometimes will convert
BTJohns" to "Btjohns". To know the issue better, will you let me know the
exact code of the function? How do you get the string you want? You
mentioned that the issue "sometimes" occurs. Do you mean the issue appear
randomly?

Also, you may want to consider use some simple function to capitalize the
first letter of a string to see if you could work around the issue.

Public Function strconvert(a As String) As String
Dim b As String
Dim c As String
c = Right(a, Len(a) - 1)
b = Left(a, 1)
b = StrConv(b, vbUpperCase)
strconvert = b + c
End Function

If you have any update, please feel free to let's know. Thank you.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Peter Yang [MSFT]

Hi,

I'm still interested in this issue. If you have any comments or more
details on this issue, please feel free to let's know. We look forward to
hearing from you.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support


=====================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top