Showing posts with label String. Show all posts
Showing posts with label String. Show all posts

8/01/2012

Capitalize each word in a string (similar to InitCap in Oracle)

Capitalize each word in a string (similar to InitCap in Oracle) In Access, the StrConv function returns a string converted as specified.
The syntax for the StrConv function is:
StrConv ( text, conversion, LCID )
text is the string that you wish to convert.

7/14/2012

Parse a string into two values based on the occurrence of an underscore

Parse a string into two values based on the occurrence of an underscore Question: In Access 2003/XP/2000/97, I have a table with a field that I need to separate into two different fields. The field is alpha/numeric in its contents:
Example of the field content is:
1234_ACME company
I need this field split into two fields such as:
Field1: 1234
Field2: ACME company
The Underscore (_) can be in any position in the string.
Answer: In Access, you can create custom functions to supplement what is missing in Access. To do this, click on the Modules tab in the Database window and create a new module.