Capitalize All In Form Field

MiAs

Registered User.
Local time
Yesterday, 16:53
Joined
Oct 25, 2004
Messages
49
Hi,
How do I capitalize all letters of an entry in a form field?
I have seen the CApitalize help files for first two letters but wish to capitalize all letters when entering a name.
Thanks
 
Hi
You could put the following in the AfterUpdate event of the field

Me.txtMyField = UCase(Me.txtMyField)

I think that will do the trick
Good luck
 
In your table if Data type = Text enter > in the format section, If you are using access 2003 you can change it any time and Access will upate the formatting. If you are not using 2003 open the form click properties for the text field and enter > into Format.


I must admit Malcy's is my choice
Me.txtMyField = UCase(Me.txtMyField)

Regards,
 
Macro

Thanks for the advice but I have another problem,
I have entered the event as suggested but get a dialog box stating "can't find macro 'Me'."
I forgot to mention,using access 97
 
MiAs,

Have a look at the attached sample, look behind the txtMyName in the forms

It will work fine in Access 97 (the attached sample is in 97)



Regards,
 
Last edited:
UpperCase

John,
Will the code work in a list box or just a text box as I need the field to expand to add several names at times?
 
Rather than use UCase, since it should be irrelevant how data is stored in the table, you can simply set a textbox's Format property to >L

Regarding a listbox, you can set the Format property of the relevant field in the underlying recordset.
 
Report Printout

Following last thread for which I am grateful, '>' symbol without 'L' capitalizes as required.
I need to print out a report from the form in uppercase but the entries are lowercase?
 
MiAs,

Have a look at the attached DB, it has both examples the one in my first post (>) and the second with code. I have added a report, it works fine (capitals).

you say:

but the entries are lowercase

Are you saying that the after you applied the code or > you data is still in lower case?


Regards,
 
Last edited:
Format

John,
After I left the last thread I realised I needed to change format for reports also, all is fine now,thanks to all for your advice.
 

Users who are viewing this thread

Back
Top Bottom