ProperCase

G

Guest

I have a client info form and want to change all my Clients names to
properCase with and update query in Access 2003. I have a access 2002 book
that shows how to do it, but it says function undefined, can anyone help.
Thanks, edward Keith
 
G

Guest

I Thank you for That. However, Unless I update each record, It does not
change to properCase. Should I try beforeUpdate or use a query.
 
A

Allen Browne

For existing data, use an Update query. (Update on Query menu, in Query
design view.)
 
G

Guest

Hi Keith

If you want to update the existing records to proper case, first back up
your data, because there is not return after you change it.

Try this update query to update the exisiting records, change the names to
suit yours

UPDATE TableName SET [TableName].[FieldName] =
StrConv([FieldName],"vbProperCase")
 
G

Guest

Thanks for your responses, but the problem is as decribed in my original
question.
I try to do an update query and in the update to box I put
ProperCase({Company]) and a messege comes up than the function is undefined.
Your Help is appreciated, Edward Keith
 
G

Guest

thank you!

Ofer said:
Hi Keith

If you want to update the existing records to proper case, first back up
your data, because there is not return after you change it.

Try this update query to update the exisiting records, change the names to
suit yours

UPDATE TableName SET [TableName].[FieldName] =
StrConv([FieldName],"vbProperCase")



edward keith said:
I Thank you for That. However, Unless I update each record, It does not
change to properCase. Should I try beforeUpdate or use a query.
 
F

fredg

Hi Keith

If you want to update the existing records to proper case, first back up
your data, because there is not return after you change it.

Try this update query to update the exisiting records, change the names to
suit yours

UPDATE TableName SET [TableName].[FieldName] =
StrConv([FieldName],"vbProperCase")

edward keith said:
I Thank you for That. However, Unless I update each record, It does not
change to properCase. Should I try beforeUpdate or use a query.

I hope the OP has backed up his data, because this will not work!!!

1) =StrConv([FieldName],"vbProperCase") is not correct.

a) vbProperCase is a VBA Number constant. It should not be enclosed
within quotes.
=StrConv([FieldName],vbProperCase) will work in VBA.

b) Because vbProperCase is a VBA constant, not an Access constant,
it cannot be used directly in an Access query. Instead use the
constant's numeric value of 3.
=StrConv([FieldName],3) will work directly in a query.
 
A

Allen Browne

Sorry, Keith. The issue was about trying to get vbProperCase to work in the
context of a query? You're right: the constant is not available in that
context. Just use a 3 instead.

If you open the Immediate window (Ctrl+G) and enter:
? vbProperCase
Access responds with a 3.

You can also check the value of the constant with the object browser (F2.)
 
G

Guest

Thank you Fred,
In such metters a should try it first before posting, it can be critical for
some people.

Thanks again


fredg said:
Hi Keith

If you want to update the existing records to proper case, first back up
your data, because there is not return after you change it.

Try this update query to update the exisiting records, change the names to
suit yours

UPDATE TableName SET [TableName].[FieldName] =
StrConv([FieldName],"vbProperCase")

edward keith said:
I Thank you for That. However, Unless I update each record, It does not
change to properCase. Should I try beforeUpdate or use a query.

:

Keith, you got 2 answers when you posted this question in m.p.a.formscoding.

I hope the OP has backed up his data, because this will not work!!!

1) =StrConv([FieldName],"vbProperCase") is not correct.

a) vbProperCase is a VBA Number constant. It should not be enclosed
within quotes.
=StrConv([FieldName],vbProperCase) will work in VBA.

b) Because vbProperCase is a VBA constant, not an Access constant,
it cannot be used directly in an Access query. Instead use the
constant's numeric value of 3.
=StrConv([FieldName],3) will work directly in a query.
 

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

Similar Threads


Top