MS Access: LCase Function
This MSAccess tutorial explains how to use the Access LCase function with syntax and examples.
Description
The Microsoft Access LCase function converts a string to lower-case.
Syntax
The syntax for the LCase function in MS Access is:
LCase ( text )
Parameters or Arguments
- Text
- The string that you wish to convert to lower-case.
Applies To
The LCase function can be used in the following versions of Microsoft Access:
- Access 2019, Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000
Example
Let's look at how to use the LCase function in MS Access:
LCase ("Tech on the Net") Result: "tech on the net" LCase ("124ABC") Result: "124abc"
Example in VBA Code
The LCase function can be used in VBA code in Microsoft Access.
For example:
Dim LResult As String LResult = LCase ("This is a TEST")
In this example, the variable called LResult would now contain the value "this is a test".
Example in SQL/Queries
You can also use the LCase function in a query in Microsoft Access.
For example:
In this query, we have used the LCase function as follows:
Expr1: LCase([CategoryName])
This query will return the CategoryName field converted to all lowercase and display the results in a column called Expr1. You can replace Expr1 with a column name that is more meaningful.
For example:
LowercaseName: LCase([CategoryName])
The results would now be displayed in a column called LowercaseName.
Advertisements