473,387 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Capitalize first letter instead of entire string.

blyxx86
256 100+
I have the code to capitalize an entire string when it is input, but would like to capitalize just the first letter of a box, or match the case of a drop down list..

My current code is thus:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Serial_AfterUpdate()
  2.     'Makes serial field input all caps into database no matter what.
  3.     Me.Serial = StrConv(Me.Serial, vbUpperCase)
  4. End Sub
  5.  
Perhaps there is a way to change "StrConv" to another piece of code that is more specific, and allows wildcards?

Another option, I have a drop down list of names, but I type in the first few letters first, and then select from there, is there a way for it to match the case of the drop down field instead?
Nov 21 '06 #1
1 6255
Killer42
8,435 Expert 8TB
If you want to convert the first letter of each word, just use vbProperCase. Converting just the first letter would be fairly simple, by concatenating = Ucase(Left(Me.Serial, 1)) & Mid(Me.Serial, 2).

Beyond that it's getting a little more complex, and I don't have the time to address it now. Hopefully someone else will.
Nov 21 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Rick | last post by:
For some reason my function to capitalize the first letter in a string and keep all the other letters lowercase isn't working. This is what I have. string convname(string name) { int len;...
3
by: news.individual.net | last post by:
Hi! Can I capitalize the first letter of the first paragraph without using a special class for that <p> ? I tried it with this: body > p:first-child:first-letter { font-size: 270%;
10
by: Aaron | last post by:
string a = "i have an apple"; i want the output to be "I Have An Apple"; i was able to capitalize the first word but can't figure out how to capitalize every word in that string Thanks,...
3
by: gil | last post by:
I have a script that will capitalize the first letter of every word in my descriptions. But some of my descriptions contain ( ) and /. For example bezel (black). I need the script to capitalize...
1
by: Dwight Shubert | last post by:
Hi all, This is my first try using Access. I understand how to format a text field for uppercase and lowercase, but how do you capitalize only the first letter of each word? tia Dwight
5
by: DDK | last post by:
What is the best way to capitalize the first letter of a string? Thanks for any help, d.
7
by: dizzylizzyd514 | last post by:
I need to make this: introductoRy speEch ==> Introductory Speech pRecalCulus 1 and 2 ==> Precalculus 1 And 2 I know how to capitalize the first letter of a word, but not multiple words in a...
12
by: jackson.rayne | last post by:
Hello, I am a javascript newbie and I'm stick at one place. I have a requirement where I will get a sentence in a variable example var v1 ="This is a sentence"
12
by: dissectcode | last post by:
I know about toupper() and tolower() but I need to capitalize (or de-capitalize)the first letter of a word in a header file. I know there are no preprocessor functions that do that but is there...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.