ACC: Sample Function to Capitalize Words and Phrases (110391)
The information in this article applies to:
- Microsoft Access 1.0
- Microsoft Access 1.1
- Microsoft Access 2.0
This article was previously published under Q110391 SUMMARY
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article describes a sample user-defined function called Proper() that
you can use to capitalize the first character of a word or set of words.
This article contains two versions of the Proper() function:
- One version is used in the AfterUpdate property of a control on a
form, primarily for data entry.
- The other version is used in calculated query fields, calculated
controls on forms and reports, macro SetValue expressions, and Access
Basic expressions.
NOTE: Microsoft Access version 2.0 includes a sample Proper() function in
the sample database SOLUTION.MDB. The Proper() function is located in the
Proper module. The NWIND.MDB also includes this sample function in the
Utility Functions module.
NOTE: Microsoft Access for Windows 95 has a new function, StrConv, that
provides this functionality. For more information about the StrConv
function, search for "StrConv function" using the Microsoft Access for
Windows 95 Help Index.
This article assumes that you are familiar with Access Basic and with
creating Microsoft Access applications using the programming tools provided
with Microsoft Access. For more information on Access Basic, please refer
to the "Introduction to Programming" manual.
REFERENCES
For more information about methods of calling a function, please see the
following articles in the Microsoft Knowledge Base:
97514 ACC: Writing Functions Called from Events or Expressions
For more information about manipulating text strings, please see the
following articles in the Microsoft Knowledge Base:
115915 ACC: Sample Expressions to Extract Portion of Text String
Modification Type: | Major | Last Reviewed: | 5/6/2003 |
---|
Keywords: | kbhowto kbprogramming KB110391 |
---|
|