473,471 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ucase or an expression that makes lowercase letters turn to uppercase automatically



I need to make a field put uppercase letters in it when a lowercase
letter is entered into that field. Is there an expression to use or does
it have to be written in code?

*** Sent via Developersdex http://www.developersdex.com ***
Jan 9 '06 #1
5 3594
"Todd Snyder" <ts*****@cetusgroup.com> wrote in message
news:Cz**************@news.uswest.net...


I need to make a field put uppercase letters in it when a lowercase
letter is entered into that field. Is there an expression to use or does
it have to be written in code?


The simplest way to do this is in the design of the table, select the field
and into the format property write ">" (without the quotes, ie >).
This will not change the data as lower case letters will still be held in
the table, it just forces them to appear as upper case. If you have to make
sure that no lower case letters are entered into the table, then the only
way is to write code in the form where you enter the data. However, the
solution above is quick, simple and may do all you require.
Jan 9 '06 #2
what would the code be if my field name is site_id.

*** Sent via Developersdex http://www.developersdex.com ***
Jan 9 '06 #3
You could try this. I haven't tired it for years; its use should
[probably] belimited to those who feel comfortable with VBA and form's
coding]:

Private Declare Function GetKeyboardState Lib "user32" (pbKeyState As
Byte) As Long
Private Declare Function SetKeyboardState Lib "user32" (pbKeyState As
Byte) As Long
Private Const VK_CAPITAL = &H14
Dim mAKBState(0 To 255) As Byte

Private Sub txtLastName_GotFocus()
Dim aKBState(0 To 255) As Byte
GetKeyboardState mAKBState(0)
GetKeyboardState aKBState(0)
aKBState(VK_CAPITAL) = aKBState(VK_CAPITAL) Or 1
SetKeyboardState aKBState(0)
End Sub

Private Sub txtLastName_LostFocus()
SetKeyboardState mAKBState(0)
End Sub

Jan 9 '06 #4
If your text box is called something like txtBox1 then in the after
update event for the box use

Me.txtBox1 = UCase(Me.txtBox1)

Jan 10 '06 #5
Further to my previous reply I didn't read your second message so your
after update code would be

Me.[site_id]=UCase(Me.[site_id])

As a point of interest I find it easier to use

SiteID instead of site_id It saves messing about with square brackets
if you have no spaces in object names.

Jan 10 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Marcello Pietrobon | last post by:
Hello, I am reading http://www.amk.ca/python/howto/regex/ But there is an incongruence: In the paragraph 2.1: Matching Character: |\w| Matches any alphanumeric character; this is...
2
by: Thomas McK | last post by:
Hi all, I'm trying to make a SQL query (against a table in MS Access) where I want to take the value of something, and check to see if the first two letters in that value are capitalized (for...
7
by: tsnyder | last post by:
I need to define a field so that when a lowercase letter is put in the field it turns to an uppercase letter. What would the expression for the field be? My field name is site_id.
12
by: Johnny Williams | last post by:
I'm struggling to create a regular expression for use with VB .Net which matches a person's name in a string of words. For example in "physicist Albert Einstein was born in Germany and" I want...
2
by: chibialien57 | last post by:
hi! I need help in creating a program for converting uppercase to lowercase letters with variable arrays (single-dimension arrays). I am a bit confused. Help will be appreciated! Thanks!
6
by: David | last post by:
I'm having trouble getting the regular expression validator to work with a text box. In this simple example I only want lower case letters to be allowed. So I tried the following and it doesn't...
1
by: mkk572ny | last post by:
Hi, I was wondering if anyone could help me to create a java method to changing the uppercase letters to lowercase and visa versa in a string using a for-loop. Thanks.
2
by: Bob Nelson | last post by:
Concerning program startup in a hosted environment, both C90 and C99 require that the implementation provide main's ``argv'' strings in lowercase if the host environment is not capable of supply...
56
by: Adem | last post by:
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" The C++ Standard (ISO/IEC 14882, Second edition, 2003-10-15) says under...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.