MS-Access - capitalization of existing data

G

Guest

I have worked with databases for about 30 years. Most databases have had a
function such as @proper that can be used in form-fields, applied to existing
data, or attached to the table design. Am I losing it, or is this basic
feature not included in MS-Access 2000?


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...-958e-3decfe78830b&dg=microsoft.public.access
 
A

Arvin Meyer [MVP]

You can use it in an Update query, but you must use the value of the
constant. Add an alias column to the query:

Expr1: StrConv([MyField], 3)

You can create a public function that can be used anywhere, including a
query. Try this:

Public Function Proper(strIn As String) As String
Proper = StrConv(strIn, vbProperCase)
End Function

and then in a query:

Expr1: Proper([MyField])

or for existing data:

UPDATE Table1 SET Table1.MyField = Proper([MyField]);
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access


James said:
Thank you. I saw this function in the help section, but I am surprised at the
lack of such a basic feature in MS-Access. One would think to select data and
apply a "proper capitalization" function or command. Looks like a bit of
programming for each field in the converted data...

James
http://www.microsoft.com/office/community/en-us/default.mspx?mid=223f335c-21
48-48c2-958e-3decfe78830b&dg=microsoft.public.access
 
D

Douglas J. Steele

You can write an Update query that will set all of the data in your existing
table to upper case.

You can set up InputMasks for the fields in your datasheet so that the input
is converted to upper case. Normally InputMasks only affect how the data
appears, not how it's stored in the table, but you can override this
behaviour when you create the InputMask (by putting ;1 at the end of it)
 

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