Displaying Title Case

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I display a text field in title case format on a form's text field
control?
For example, I would like to display "subject" or "SUBJECT" as "Subject".
 
Thanks for your reply. It works fine.

However, I have an external table's fieldname called "type". The StrConv()
returns an Error, since MS Access converts the "=StrConv([type],3)" to
"=StrConv([Type],3)", i.e. converted "t" to "T". Any workaround?

Allen Browne said:
Use StrConv, e.g.:
=StrConv([Subject], 3)

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

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

Charles Tam said:
How do I display a text field in title case format on a form's text field
control?
For example, I would like to display "subject" or "SUBJECT" as "Subject".
 
Okay, so this is an external database that has case-sensitive field names,
and Access is insisting on changing the name of this field becuase there are
built-in things that have a Type property.

Could you use a query (or view) to connect to your database, and alias the
name in the query so as to avoid the conflict, i.e.:
SELECT type AS TheType, Field1, ... FROM SomeAttachedTable...

That should let you use:
=StrConv([TheType], 3)

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

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

Charles Tam said:
Thanks for your reply. It works fine.

However, I have an external table's fieldname called "type". The StrConv()
returns an Error, since MS Access converts the "=StrConv([type],3)" to
"=StrConv([Type],3)", i.e. converted "t" to "T". Any workaround?

Allen Browne said:
Use StrConv, e.g.:
=StrConv([Subject], 3)


Charles Tam said:
How do I display a text field in title case format on a form's text
field
control?
For example, I would like to display "subject" or "SUBJECT" as
"Subject".
 
Thanks. It is working.

Allen Browne said:
Okay, so this is an external database that has case-sensitive field names,
and Access is insisting on changing the name of this field becuase there are
built-in things that have a Type property.

Could you use a query (or view) to connect to your database, and alias the
name in the query so as to avoid the conflict, i.e.:
SELECT type AS TheType, Field1, ... FROM SomeAttachedTable...

That should let you use:
=StrConv([TheType], 3)

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

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

Charles Tam said:
Thanks for your reply. It works fine.

However, I have an external table's fieldname called "type". The StrConv()
returns an Error, since MS Access converts the "=StrConv([type],3)" to
"=StrConv([Type],3)", i.e. converted "t" to "T". Any workaround?

Allen Browne said:
Use StrConv, e.g.:
=StrConv([Subject], 3)


How do I display a text field in title case format on a form's text
field
control?
For example, I would like to display "subject" or "SUBJECT" as
"Subject".
 
Back
Top