UCASE

C

Cheryl Fischer

In VBA code, as a variable:

strNameInCaps = UCase([MyField])

In a query:

NameInCaps: UCase([MyField])

hth,
 
A

Al Camp

Richard,
I think you're saying how do I force entries in a field to be Upper Case,
even if the user enters the data in Lower Case?
On the AfterUpdate event of a field called (ex.) [MyField1]... and a user
entry of "aBcDeF"
[MyField1] = UCase([MyField1])
will store the entry in Upper case even if the user entered uppercase,
lowercase, or a mix of each ("ABCDEF")

Note: Just using the ">" Format for a field will DISPLAY any entry in
upper case, but does not save the data in the table as uppercase.
 
B

Bruce M. Thompson

How do i use the UCase to make a field uppercase only?

In addition to the other solutions offered, you can also force the entries to
upper case as they are typed from within the control's "KeyPress" event
procedure:

'**********
Private Sub txtUpper_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
'**********
 

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