Automating Uppercase

steve711

Registered User.
Local time
Today, 14:12
Joined
Mar 25, 2004
Messages
166
Is it possible to write one subroutine to handle changing the case of 30 different text boxes as the user leaves each one of them?

I would rather not have to write 30 times the same bit of code to do this simple task.

Any simple ideas?
 
well... why not just highlight all 30 of the text boxes at the same time and then set the format property?
 
Because I want it saved as upper case not just displayed as upper case. I changed the properties FORMAT to > which yielded the proper results on the form but not when saved to the table.

Good idea but I already went that direction.
 
ok...

Code:
for i=0 to me.controls.count-1
   controls(i) = ucase(controls(i))
next i

may need to add a docmd.save afterward to make it update the db...or you could just execute the same logic on the table itself instead of at the form level
 
Thanks for the suggestion. However, this code changes all of my controls or text boxes to upper case. In my case I only need 30 of the 40 on there.

I am just going to go ahead and do it individually for now and hopefully something pops into my head to solve it better....
 
I was offering suggestions, not trying to be explicit:
steve711 said:
Any simple ideas?

1. Select the fields you want to be in upper case
2. set the input mask to '>????????????????????' the number of '?' defines length of field, the '>' forces upper case
3. SAVE the record after the input (Access will do this automatically if you are moving from one record to the next, but if you are using the fields for data entry only , you will have to execute the save command.)

or you could change the format property of the particular fields on the table instead of on the form...
 
Last edited:
Thanks again for your suggestions. The last one proved to be the simplest and the one that I will use. It is really amazing all of the little features in Access....Glad we have this forum for an amateur like me...
 

Users who are viewing this thread

Back
Top Bottom