Update to Upper Case

S

Student Databaser

I have two fields in Tbl STUDENT, one is Home State (H_STATE) and the other
is Work State (W_STATE), i need an update query that changes all records to
uppercase letters in these fields. I've tried this several different ways
and i am still getting errors. Please help.

UPDATE STUDENT SET
WHERE (((STUDENT.H_STATE)=StrConv([H_STATE],1)) AND
((STUDENT.W_STATE)=StrConv([W_STATE],1)));
 
S

Student Databaser

It returned an error "Undefined function 'UCase' in expression."

Any other suggestions?

Jerry Whittle said:
UPDATE STUDENT SET
H_STATE = UCase([H_STATE]) ,
W_STATE = UCase([W_STATE]) ;
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Student Databaser said:
I have two fields in Tbl STUDENT, one is Home State (H_STATE) and the other
is Work State (W_STATE), i need an update query that changes all records to
uppercase letters in these fields. I've tried this several different ways
and i am still getting errors. Please help.

UPDATE STUDENT SET
WHERE (((STUDENT.H_STATE)=StrConv([H_STATE],1)) AND
((STUDENT.W_STATE)=StrConv([W_STATE],1)));
 
B

Bob Barrows [MVP]

Do you have any fields or tables named "UCase" in your database? If so,
change the name of the field/table to an unreserved word (avoid the
names of builtin functions). If not ...

Although this problem typically results in a problem with the Date()
function, you may be experiencing the "MISSING Reference" problem. See
http://www.mvps.org/access/bugs/bugs0001.htm

Student said:
It returned an error "Undefined function 'UCase' in expression."

Any other suggestions?

Jerry Whittle said:
UPDATE STUDENT SET
H_STATE = UCase([H_STATE]) ,
W_STATE = UCase([W_STATE]) ;
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Student Databaser said:
I have two fields in Tbl STUDENT, one is Home State (H_STATE) and
the other is Work State (W_STATE), i need an update query that
changes all records to uppercase letters in these fields. I've
tried this several different ways and i am still getting errors.
Please help.

UPDATE STUDENT SET
WHERE (((STUDENT.H_STATE)=StrConv([H_STATE],1)) AND
((STUDENT.W_STATE)=StrConv([W_STATE],1)));
 
S

Student Databaser

Thanks Bob. I think we are experiencing some problems with our server that
is causing these type of errors. They (the people who manage our server) did
an update of some kind and since then things have just not worked properly.

I tried the query on a old backup of the database (before the update) and it
worked just fine.

Thanks for you help.

Bob Barrows said:
Do you have any fields or tables named "UCase" in your database? If so,
change the name of the field/table to an unreserved word (avoid the
names of builtin functions). If not ...

Although this problem typically results in a problem with the Date()
function, you may be experiencing the "MISSING Reference" problem. See
http://www.mvps.org/access/bugs/bugs0001.htm

Student said:
It returned an error "Undefined function 'UCase' in expression."

Any other suggestions?

Jerry Whittle said:
UPDATE STUDENT SET
H_STATE = UCase([H_STATE]) ,
W_STATE = UCase([W_STATE]) ;
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

:

I have two fields in Tbl STUDENT, one is Home State (H_STATE) and
the other is Work State (W_STATE), i need an update query that
changes all records to uppercase letters in these fields. I've
tried this several different ways and i am still getting errors.
Please help.

UPDATE STUDENT SET
WHERE (((STUDENT.H_STATE)=StrConv([H_STATE],1)) AND
((STUDENT.W_STATE)=StrConv([W_STATE],1)));

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
 

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