A
Allen
How do I capitalize text entries without having to delete entered information
then re-entering that information again?
then re-entering that information again?
I've been trying the update query and have lost all my data. when I entered
this line of code:"fname"=UCase("fname"), the names in those field changed to
"0" or a "-1".
Can you explain some steps I should follow that will help me along.
Thanks.
Rick B said:You would update to UCase([fname])
--
Rick B
Allen said:I've been trying the update query and have lost all my data. when I entered
this line of code:"fname"=UCase("fname"), the names in those field changed to
"0" or a "-1".
Can you explain some steps I should follow that will help me along.
Thanks.
John Vinson said:I've been trying the update query and have lost all my data. when I entered
this line of code:"fname"=UCase("fname"), the names in those field changed to
"0" or a "-1".
Can you explain some steps I should follow that will help me along.
Thanks.
Where did you enter this code?
What it's doing is comparing the text string "fname" to the text
string returned by the function UCase("fname") - which would of course
be FNAME. Since Access comparisons are not case sensitive,
"fname"="FNAME" is a true statement; therefore it's updating your
field to True, which is stored as -1.
What you should do to update a text field named fname to ALL CAPS is
to create an Update query; on the Update To line under Fname simply
type
UCase([fname])
The brackets tell Access that you want to pass the *VALUE* of the
field named fname; if you say "fname" in quotes, it will pass the
five-letter text string "fname" to the function, which will dutifully
return FNAME.
If (as I'd suggest) you want to update "allen" to "Allen" (rather than
to "ALLEN"), you will need a different function: update the field to
StrConv([fname], 3)
John W. Vinson[MVP]