vba code to change text fields to upper case

sxxgupta
sxxgupta used Ask the Experts™
on
I have a table called "Labor" with several fields, some of which are text.  I need expert help in developing a vba sub that upon execution, converts all these text based fields to upper case.  The exception is with one field is called "Misc" (also text) which should not be converted to upper case.  Please help.  Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010
Commented:
No need for code; just write a query that does it.  Such as:

UPDATE [SomeTable]
SET [Column1] = UCase([Column1]), [Column2] = UCase([Column2]), [Column3] = UCase([Column3]), [Column4] = UCase([Column4])

Open in new window


Rename table/column references and expand as needed.
Top Expert 2010

Commented:
Of course, you could also use code on your forms to enfore all upper case on the appropriate controls on the BeforeUpdate event...

Author

Commented:
Thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial