much better, fred, thanks for catching my back - and teaching me something,
too!
On Thu, 14 Jul 2005 14:58:01 -0700, ktfrubel wrote:
Tina,
Thank you so much. I will let you know if I get it to work.
Would you happen to know if this can be done in SQL as well and if so do
you
know how?
Again thanks for the help
Tara
:
formatting changes only the way values are displayed, it does not
affect the
values themselves. there is no built-in Format setting for ProperCase
(which
is "the first letter of each word in a string is Uppercase"). you could
*display* field data as ProperCase, without actually changing the data,
by
using a small VBA function in a query to return the field values as
ProperCase.
if you want to actually *change* the data to ProperCase, you can't
change it
at the time that you import the data. but you *can* change the data
values
to ProperCase by running an Update query on the fields you want to
change,
again using a simple VBA function to return the field values as
ProperCase.
the following function should work in both a Select query (for display
purposes) and an Update query (for changing the data):
Public Function isProperCase(ByVal strText As String) As String
isProperCase = StrConv(strText, vbProperCase)
End Function
just paste the function into a public module in your database. in your
query, supply the name of your field for the function's argument, as
isProperCase([MyFieldName])
hth
I know that in the format field of a table you can make the letters of
that
field be either upper case or lower case by using the greater than or
less
than signs. Is there a way to format the field to Only allow the
first
letter of each word in the field to be capitlized. I import several
different talbes on a daily basis from many different sources, I was
wondering if this was possible, because it would assist in the cleanup
on
my
database standards.
Somebody, Please help
The User Defined function tina gave you is for use in VBA.
You don't need to use VBA to accomplish this.
In SQL (as well as in Access) you use the vbProper value (3), not the
VBA constant.
Update YourTable Set YourTable.[Paragraph] = StrConv([Paragraph],3);
Look up StrConv() in VBA help.