473,387 Members | 1,603 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.

how do I force the first letter to be a capital letter in access?

Hay, i'm a student, learning Access and need help asap ;). What input mask should I use to turn the first letter into uppercase and the rest lower? S.o. S
Sep 11 '16 #1

✓ answered by ADezii

The following Input Mask in a Text Box will:
  1. Allow for a Maximum of 25 characters.
  2. Allows only Alpha Characters, no Numbers, and no special Characters such as: '$', '@', '#', '&', etc.
  3. Allows Space, Backspace, Delete Key, etc.
  4. The 1st Character is 'Required'.
  5. Automatically forces the 1st Character to Upper Case and the remaining 24 Characters, which are optional, to Lower Case.
  6. Should you need > 25 Characters, simply append '?s' to the Input Mask.
    Expand|Select|Wrap|Line Numbers
    1. >L<????????????????????????
  7. Hope this is what you were looking for.

3 12859
PhilOfWalton
1,430 Expert 1GB
On the AfterUpdate of the "MyName" control, you need the following code

Expand|Select|Wrap|Line Numbers
  1. Private Sub MyName_AfterUpdate()
  2.  
  3.     Myname = StrConv(Left(MyName, 1), vbUpperCase) &
  4.     StrConv(Right(Myname, Len(MyName) - 1), vbLowerCase)
  5.  
  6. End Sub
  7.  
So it converts the leftmost letter to Upper case, and the letters that are left to Lower case.

You wil run into problems with a name like "De Vere" though

Phil
Sep 11 '16 #2
Thx for the help. But if I just want to enter it at the design view> input mask. What should I use? I'm not tht smart with access yet :)
Sep 11 '16 #3
ADezii
8,834 Expert 8TB
The following Input Mask in a Text Box will:
  1. Allow for a Maximum of 25 characters.
  2. Allows only Alpha Characters, no Numbers, and no special Characters such as: '$', '@', '#', '&', etc.
  3. Allows Space, Backspace, Delete Key, etc.
  4. The 1st Character is 'Required'.
  5. Automatically forces the 1st Character to Upper Case and the remaining 24 Characters, which are optional, to Lower Case.
  6. Should you need > 25 Characters, simply append '?s' to the Input Mask.
    Expand|Select|Wrap|Line Numbers
    1. >L<????????????????????????
  7. Hope this is what you were looking for.
Sep 11 '16 #4

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

Similar topics

5
by: Andrew James | last post by:
Gentlemen, I'm running into a problem whilst testing the parsing of a language I've created with TPG . It seems that for some reason, TPG balks when I try to parse an expression whose first...
12
by: Alan J. Flavell | last post by:
OK, today's email brought a comment from a reader, pointing out something that I'd long since noticed myself but hadn't done anything about it. On my pages, I've got a first-letter style on...
6
by: Fungii | last post by:
Hello, I have a stylesheet that sets p:first-letter to a certain size and colour. I was playing around with Javascript to change paragraph stylesheets using an array like this: var paras =...
3
by: pilar | last post by:
Hi All, How can I validate the entry in a text field depending on the first letter of the string. I need to have a text box to acept 14 characters if the first letter entered is M and 17...
4
by: George Thompson | last post by:
How can I retrieve the first letter of data in a field within access? (using access 2k?) is this a VB thing or is there an obvious solution?
4
by: Dwight | last post by:
Hi all, How do you capitalize the first letter of each word in a field. I can format the field to UPPER case the last name of a person, but I can't UPPER case just the first letter of each name....
1
by: Marc Verdonck | last post by:
First: I have some troubles in access, some fields needs to begin with a Capital letter. Example: louiselaan need to be Louiselaan. How can I become this? Second: I'm exporting my database to...
2
by: Prisy | last post by:
Is it possible to have the text of the first-letter in an <asp:button> underlined? I was able to do the following to get the first letter underlined: <STYLE type="text/css">...
8
by: =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z | last post by:
I lookup the utf-8 form of delta from the link. http://www.fileformat.info/info/unicode/char/0394/index.htm and then I want to print it in the python ( I work under windows) #!/usr/bin/python...
5
by: Moham12345 | last post by:
How can i detect if there is more then capital letter in a word?
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.