473,395 Members | 1,720 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,395 software developers and data experts.

Capital Letters in a field

17
In Access, there used to be a way to Set the first letter in a field to automatically UpperCase in a form or table to override a lowercase entry. Does anyone know what that is? Thanks
Dec 1 '08 #1
3 8072
ChipR
1,287 Expert 1GB
I know of 2 ways to do this.
One is to put code somewhere to fix what the user entered:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Text2_Exit(Cancel As Integer)
  2.     Text2 = StrConv(Text2, vbProperCase)
  3. End Sub
which will capitalize every word, whether you like it or not.

The other is to put an input mask on the field like
>A<CCCCCCCCCCCCCCCC
but that makes the first character (which is required) capitalized, and all subsequent letters (optional) small. It doesn't allow any more capital letters, but it does allow you to set a maximum length by the number of C's you put in.

Here's info on input masks:
http://www.teacherclick.com/access2003/a_5_1_2.htm
Dec 1 '08 #2
missinglinq
3,532 Expert 2GB
To capitalize only the first character in a textbox:

Expand|Select|Wrap|Line Numbers
  1. Private Sub TextboxName_AfterUpdate()
  2.   Me.TextboxName = UCase(Left(Me.TextboxName, 1)) & Right(Me.TextboxName, Len(Me.TextboxName) - 1)
  3. End Sub
The Exit event should not be used for this kind of thing, it will fire every time the user tabs thru the field. Use the AfterUpdate event instead;it will only fire if the data is entered for the first time or is edited.

Linq ;0)>
Dec 1 '08 #3
Dbar10
17
Thank you ChipR This will work for what I need.
Dec 2 '08 #4

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

Similar topics

2
by: Jeff | last post by:
Hi, I am trying to insert a space before all capital letters in a string except the first occurrence. For example: FirstSecondThird would become First Second Third Is there a regular...
4
by: Carlos Marangon | last post by:
Hello! People go to sign my guestbook and wrote all text in capital letters. Did you know any script that shows an window alert when one types the second capital letter? Best regards,
2
by: Ebi | last post by:
Hi I'm writing a project in C++ borland 5; and I need a function that get a string or char* variable and convert all of the small letters to the capital. please help me. -- Sincerely Yours...
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...
3
by: Marc Verdonck | last post by:
Hello, 1. I received a mail from Larry but it doesn't work, I'm not a programmer. How can I simply make a field (street) begin with a capital letter in another field (adress) everything capital...
1
by: thomaz | last post by:
How I can place in capital letters the text of a COMBOBOX? For TEXTBOX I use: textBox1.CharacterCasing = CharacterCasing.Upper;... How to make the same for a COMBOBOX? There isnt a...
3
by: Bertha94 | last post by:
I am trying to set certain cells to capitalize any input whethere they have the caps lock on or not. I have toyed with "Private Sub Workbook_SheetChange" to turn all changes into an object with...
5
Presto731
by: Presto731 | last post by:
HOW do i make the letters in various fields on a form always be capital no matter if they used capital letters or not when typing?
1
by: minimatrix | last post by:
Hi guys just wandering if I could get a little help! , I have wrote a Perl script to sort out some data in my database, I am saving into an sql file but having a few problems executing the sql...
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: 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...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.