UCase (1 Viewer)

redblaze

Registered User.
Local time
Today, 18:21
Joined
Jan 12, 2002
Messages
54
what code to i need to use so that the calue of a field can only be in caps?
 
D

D B Lawson

Guest
Me.YourField = UCase(Me.YourField) on the after update event of YourField would convert entry to upper case. I prefer that to putting > in the format property of the text field but either work
 

Fornatian

Dim Person
Local time
Today, 18:21
Joined
Sep 1, 2000
Messages
1,396
Alternatively you can put:

KeyAscii = Asc(UCase(Chr(KeyAscii)))

in the Form_KeyPress event and set KeyPreview to Yes.

Your users will then only be able to enter letters in uppercase - numbers are not affected.

HTH

Ian
 

Rich_Lovina

Registered User.
Local time
Tomorrow, 03:21
Joined
Feb 27, 2002
Messages
225
I have to put my twocents worth in here. Format > works for 'appearance' only, but doesn't actually CONVERT text to Upper, at least not when text is mixed with numbers (Table then shows abc123).

But if I want to set ProperCase, with
Me.[1stName] = StrConv(Me.[1stName], vbProperCase), this works and text stays this way, but again not always.

I have one nasty field, in which when applying vbProperCase, returns the ERROR>>>Argument Not Optional.

The same field does have a Module operating, Mod_Auto_Fill_New_Record, covering all TabStop=Yes fields.

Like the Professor...Why is this anomaly so?
 

Users who are viewing this thread

Top Bottom