bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MS Access Format() Function

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind MS Access Format() Function?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___ Format(Price, "Currency") AS FormattedPrice
3Order

Put the learning moves in the order that makes the concept easiest to apply.

The Format() function formats a value with the specified format.
Definition and Usage
MS Access Format() Function

Example

  SELECT Format(Price, "Currency") AS FormattedPrice
FROM Products;

Definition and Usage

The Format() function formats a value with the specified format.

Syntax

Format(
value
,
format
)

Parameter Values

ParameterDescription
valueRequired. The string to format
formatOptional. The format to to use. Format Description General Number Indicates a number, without thousand separators Currency Indicates currency, with thousand separators and two decimal places Fixed Shows minimum one digit to the left of the decimal place and two digits to the right of the decimal place Standard Shows the thousand separators + minimum one digit to the left of the decimal place, and two digits to the right of the decimal place Percent Shows a percent value (with percent sign) and two digits to the right of the decimal place Scientific Indicates scientific notation Yes/No Shows No if value = 0 and Yes if value <> 0 True/False Shows False if value = 0 and True if value <> 0 On/Off Shows Off if value = 0 and On if value <> 0 General Date Shows value as a date based on the system settings Long Date Shows value as a date based on the system's long date settings Medium Date Shows value as a date based on the system's medium date settings Short Date Shows value as a date based on the system's short date settings Long Time Shows value as a date based on the system's long time settings Medium Time Shows value as a date based on the system's medium time settings Short Time Shows value as a date based on the system's short time settings
FormatDescription
General NumberIndicates a number, without thousand separators
CurrencyIndicates currency, with thousand separators and two decimal places
FixedShows minimum one digit to the left of the decimal place and two digits to the right of the decimal place
StandardShows the thousand separators + minimum one digit to the left of the decimal place, and two digits to the right of the decimal place
PercentShows a percent value (with percent sign) and two digits to the right of the decimal place
ScientificIndicates scientific notation
Yes/NoShows No if value = 0 and Yes if value <> 0
True/FalseShows False if value = 0 and True if value <> 0
On/OffShows Off if value = 0 and On if value <> 0
General DateShows value as a date based on the system settings
Long DateShows value as a date based on the system's long date settings
Medium DateShows value as a date based on the system's medium date settings
Short DateShows value as a date based on the system's short date settings
Long TimeShows value as a date based on the system's long time settings
Medium TimeShows value as a date based on the system's medium time settings
Short TimeShows value as a date based on the system's short time settings
FormatDescription
General NumberIndicates a number, without thousand separators
CurrencyIndicates currency, with thousand separators and two decimal places
FixedShows minimum one digit to the left of the decimal place and two digits to the right of the decimal place
StandardShows the thousand separators + minimum one digit to the left of the decimal place, and two digits to the right of the decimal place
PercentShows a percent value (with percent sign) and two digits to the right of the decimal place
ScientificIndicates scientific notation
Yes/NoShows No if value = 0 and Yes if value <> 0
True/FalseShows False if value = 0 and True if value <> 0
On/OffShows Off if value = 0 and On if value <> 0
General DateShows value as a date based on the system settings
Long DateShows value as a date based on the system's long date settings
Medium DateShows value as a date based on the system's medium date settings
Short DateShows value as a date based on the system's short date settings
Long TimeShows value as a date based on the system's long time settings
Medium TimeShows value as a date based on the system's medium time settings
Short TimeShows value as a date based on the system's short time settings

Technical Details

Works in:From Access 2000

Previous

MS Access CurDir() Function

Next

MS Access InStr() Function