FNS Flashcards
(23 cards)
Asc Function
The Microsoft Access Asc function returns the NUMBER code that represents the specific character.
Asc ( string )
Asc (“W”)
Result: 87
Chr Function
The Microsoft Access Chr function returns the character based on the NUMBER code.
Chr ( number_code )
Chr (87)
Result: “W”
How to concatenate
you can concatenate multiple strings together into a single string with the & operator.
string_1 & string_2 & string_n
Format Function (with Strings)
The Microsoft Access Format function takes a string expression and returns it as a formatted string.
Format (“210.6”, “#,##0.00”)
Result: ‘210.60’
Format (“210.6”, “Standard”)
Result: ‘210.60’
Format (“0.981”, “Percent”)
Result: ‘98.10%’
Format (“1267.5”, “Currency”)
Result: ‘$1,267.50’
Format (“Sep 3, 2003”, “Short Date”)
Result: ‘9/3/2003’
InStr Function
The Microsoft Access InStr function returns the position of the first occurrence of a string in another string.
InStr ( [start], string_being_searched, string2, [compare] )
InStr(“Tech on the Net”, “T”)
Result: 1 ‘Shows how start is defaulted to 1 if omitted
InStr(1, “Tech on the Net”, “T”)
Result: 1
InStr(1, “Tech on the Net”, “t”)
Result: 1 ‘Shows that search is not case-sensitive
InstrRev function
The Microsoft Access InstrRev function returns the position of the first occurrence of a string in another string, starting from the end of the string.
InstrRev ( string_being_searched, string2 [, start [ , compare] ] )
InstrRev (“alphabet”, “a”)
Result: 5
LCase function
LCase function converts a string to lower-case
LCase ( text )
Left function
The Microsoft Access Left function extracts a substring from a string, starting from the left-most character.
Left ( text, number_of_characters )
Left (“Tech on the Net”, 4)
Result: “Tech”
Len function
The Microsoft Access Len function returns the length of the specified string.
Len ( text )
LTrim function
The Microsoft Access LTrim function removes leading spaces from a string.
LTrim ( text )
Mid function
he Microsoft Access Mid function extracts a substring from a string (starting at any position).
Mid ( text, start_position, [number_of_characters] )
Replace function
The Microsoft Access Replace function replaces a sequence of characters in a string with another set of characters (a number of times)
Replace ( string1, find, replacement, [start, [count, [compare]]] )
Right function
The Microsoft Access Right function extracts a substring from a string starting from the right-most character.
Right ( text, number_of_characters )
RTrim function
The Microsoft Access RTrim function removes trailing spaces from a string.
RTrim ( text )
Space function
The Microsoft Access Space function returns a string with a specified number of spaces.
Space ( number )
Split function
The Microsoft Access Split function will split a string into substrings based on a delimiter. The result is returned as an array of substrings.
Split ( expression [,delimiter] [,limit] [,compare] )
Str function
The Microsoft Access Str function returns a string representation of a number.
Str ( number )
StrComp function
The Microsoft Access StrComp function returns an integer value representing the result of a string comparison
StrComp ( string1, string2 [, compare ] )
StrConv Function
The Microsoft Access StrConv function returns a string converted as specified.
StrConv ( text, conversion, LCID )
Parameter Value Description
vbUpperCase 1 Converts the string to all uppercase.
vbLowerCase 2 Converts the string to all lowercase.
vbProperCase 3 Converts the first letter to every word to uppercase. All other characters are left as lowercase. This option is similar to the InitCap function in Oracle.
vbUnicode 64 Converts the string to Unicode.
vbFromUnicode 128 Converts the string from Unicode to the default code page of the system.
StrReverse function
The Microsoft Access StrReverse function returns a string whose characters are in reverse order.
StrReverse ( text )
Trim Function
The Microsoft Access Trim function removes leading and trailing spaces from a string.
Trim ( text )
UCase function
The Microsoft Access UCase function converts a string to all upper-case.
UCase ( text )
Format Function (with Numbers)
The Microsoft Access Format function takes a numeric expression and returns it as a formatted string.
Format ( expression, [ format ] )
Format (210.6, “#,##0.00”)
Result: ‘210.60’
Format (210.6, “Standard”)
Result: ‘210.60’
Format (0.981, “Percent”)
Result: ‘98.10%’
Format (1267.5, “Currency”)
Result: ‘$1,267.50’