Need Proper Format

  • Thread starter Thread starter Barb
  • Start date Start date
B

Barb

Hi
How do I change the text so it appears in Proper format.
First letter - upper, rest lower case?
Everything comes in upper case from the tables and I need
to change it.

Please help
Barb
 
StrConv() converts the case. The number 3 indicates you want proper case.

To change the case in your table:
1. Create a query into this table.

2. Change it to an Update query: Update on Query menu.
Access adds an Update row to the grid.

3. Drag the fields you want to convert into the output grid.
Use StrConv() in the Update row.
For example, under the Surname field, enter:
StrConv([Surname], 3)

4. Run the query.

5. Manually fix the entries that this messes up, e.g. McDonald, van Leen,
O'Brien.

It is also possible to just set the Control Source of the text box on your
report to:
=StrConv([Surname], 3)
Also change the Name of the text box: Access gets confused if the text box
has the same name as a field, but is bound to something different.
Taking this approach, you don't get to fix the names that don't come out
correctly.

In the context of VBA code, you can use the constant vbProperCase instead of
3, e.g.:
Me.Surname = StrConv(Me.Surname, vbProperCase)

If you are still working with Access version 1 or 2, they don't have the
StrConv() function. You can grab a function that converts to Proper case
from here:
http://allenbrowne.com/func-05.html
 
Thank you
Got it now.

Barb
-----Original Message-----
StrConv() converts the case. The number 3 indicates you want proper case.

To change the case in your table:
1. Create a query into this table.

2. Change it to an Update query: Update on Query menu.
Access adds an Update row to the grid.

3. Drag the fields you want to convert into the output grid.
Use StrConv() in the Update row.
For example, under the Surname field, enter:
StrConv([Surname], 3)

4. Run the query.

5. Manually fix the entries that this messes up, e.g. McDonald, van Leen,
O'Brien.

It is also possible to just set the Control Source of the text box on your
report to:
=StrConv([Surname], 3)
Also change the Name of the text box: Access gets confused if the text box
has the same name as a field, but is bound to something different.
Taking this approach, you don't get to fix the names that don't come out
correctly.

In the context of VBA code, you can use the constant vbProperCase instead of
3, e.g.:
Me.Surname = StrConv(Me.Surname, vbProperCase)

If you are still working with Access version 1 or 2, they don't have the
StrConv() function. You can grab a function that converts to Proper case
from here:
http://allenbrowne.com/func-05.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Thanks Allen, but I need more help.
How do I build it?

Thanks
Barb


.
 
Back
Top