Upper Case Conversion

G

Guest

Hi,

Two questions
1) How can i permanently update all table values to Upper Case. Right now
they are just formatted to upper case,but when the user selects a specific
cell, they revert to lower case.

2) How can i force new entries (via form) to be saved to the database as
Upper Case.
 
F

fredg

Hi,

Two questions
1) How can i permanently update all table values to Upper Case. Right now
they are just formatted to upper case,but when the user selects a specific
cell, they revert to lower case.

2) How can i force new entries (via form) to be saved to the database as
Upper Case.

1) To change existing data, you'll need to run an Update Query.

Update YourTable Set YourTable.FieldName = UCase([FieldName]);

2) To then force new entries to Upper Case, code the Control's
AfterUpdate event:

Me![ControlName] = UCase([ControlName])

Regardless of how the user enters data, it will be converted to Upper
Case. Don't let the user get to the table.

Are you sure you wish to do this?
Text in all caps is more difficult to read.
 
G

Guest

Thanks so much....worked great!
--
Carlee


Ofer Cohen said:
First Back up your data

1. You can use update query

UPDATE TableName SET TableName.FieldName = UCase([FieldName])

this SQL will convert all the text to upper case and not only the first chr,
is that what you want?

2. Use the After Update event of the field in the form to change the text
entered to upper case

Me.FieldName = UCase(Me.FieldName)

--
Good Luck
BS"D


Carlee said:
Hi,

Two questions
1) How can i permanently update all table values to Upper Case. Right now
they are just formatted to upper case,but when the user selects a specific
cell, they revert to lower case.

2) How can i force new entries (via form) to be saved to the database as
Upper Case.
 
G

Guest

First Back up your data

1. You can use update query

UPDATE TableName SET TableName.FieldName = UCase([FieldName])

this SQL will convert all the text to upper case and not only the first chr,
is that what you want?

2. Use the After Update event of the field in the form to change the text
entered to upper case

Me.FieldName = UCase(Me.FieldName)
 

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