Format the data in tables Access 2007

Author: mety Nagm Labels::



Access gives you various options for displaying and printing the data in tables. The formatting that you choose affects only the appearance of data — not how Access stores the data. For example, if a certain product is available only by the crate, you can apply a format to control how the field is displayed so that the word & crate(s) is added to the quantity that is entered in the field. Displaying a type of quantity, such as crate(s), can help to avoid confusion about the quantity ordered.
Adding a text  string as a display format for a field
Note When you apply a format to a table field, Access uses that same format in any form or report controls that you bind (link) to the table field.
Access provides almost the same set of Rich Text field (rich text field: A field that can show formatting and graphics, such as an embedded object, and not just text.) formatting options as do several other programs in the 2007 Microsoft Office system, such as Word, Excel, and PowerPoint. You can apply Rich Text formatting to a field that is set to the Memo data type (Memo data type: In a Microsoft Access database, this is a field data type. Memo fields can contain up to 65,535 characters.).
In addition, you can choose format properties that apply only to particular data in the table — for example, negative, zero (0), or null values.
The formatting options that are available depend on the data type that you select for a table field. For example, if you create a field that uses the AutoNumber data type (AutoNumber data type: In a Microsoft Access database, a field data type that automatically stores a unique number for each record as it's added to a table. Three kinds of numbers can be generated: sequential, random, and Replication ID.), you cannot manually add, change, or delete the numbers in that field, but you can apply a format in which you want the numbers displayed.
Many data types allow you to select from the predefined Access format options. For those data types for which predefined formats are not available, you can customize a format by entering sets of literal and placeholder characters in a field. For more information about custom formats, see Overview of custom formatting options.
Note The OLE Object data type (OLE Object data type: A field data type that you use for objects created in other applications that can be linked or embedded (inserted) in an Access database.) and the Attachment data type do not allow formatting, because they both store and display files that were created by using other programs.

How Windows regional settings can affect how data is displayed

Your Microsoft Windows regional settings will influence how your date/time, numeric, and currency data types appear when you apply formatting options. Windows supports a variety of languages, plus currency and date/time formats for the countries/regions that use those languages.
For example, you might use forward slashes to enter a date value for a Date/Time field (for example, 8/29/2006), but when you apply the General Date display format, it may or may not display the forward slashes, depending on the regional settings for Windows.
This principle also applies to numeric and financial data. You can enter currency amounts that use the English pound symbol (£), but Access may display those values in euros, because that is the currency symbol selected for Windows.
The following procedure shows you how to change the Windows regional settings for your computer.

Change the regional settings

To change regional settings, follow the steps described for your computer's operating system.
In Windows Vista
  1. Click the Start buttonButton image, and then click Control Panel.
  2. Click Clock, Language, and Region, and then click Regional and Language Options. The Regional and Language Options dialog box appears.
  3. On the Formats tab, under Current format, click Customize this format. The Customize Regional Options dialog box appears.
  4. Click the tab that contains the settings that you want to modify, and make your changes. For example, to change part or all of a number format, click the Numbers tab and change the setting that you want.
In Microsoft Windows XP
  1. Click Start, and then click Control Panel.
  2. Click Date, Time, Language, and Regional Options.
  3. Click Change the format of numbers, dates, and times. The Regional and Language Options dialog box appears.
  4. Click the Regional Options tab. Under Standards and formats, click Customize. The Customize Regional Options dialog box appears.
  5. Click the tab that contains the settings that you want to modify, and make your changes. For example, to change part or all of a number format, click the Numbers tab and change the setting that you want. For help with an option, click the Help button (?), and then click the option.

Overview of predefined formatting options

You can apply an available format to control the appearance of data in a table field. For example, when a field is set to the Date/Time data type, and you select the Short Date format, a date may appear as 8/24/2007. If you select the Long Date format, that same date may appear as Wednesday, August 24, 2007. The following section lists the predefined format options that Access offers and explains how you can apply a predefined format.






Predefined formats for Number, AutoNumber, and Currency data types

The following table lists and explains the predefined formats that are available for the Number (Number data type: In a Microsoft Access database, a field data type designed for numerical data that will be used in mathematical calculations. Use the Currency data type, however, to display or calculate currency values.), AutoNumber (AutoNumber data type: In a Microsoft Access database, a field data type that automatically stores a unique number for each record as it's added to a table. Three kinds of numbers can be generated: sequential, random, and Replication ID.), and Currency (Currency data type: In a Microsoft Access database, a data type that is useful for calculations involving money or for fixed-point calculations in which accuracy is extremely important.) data types.
FormatDescriptionExample
General Number(Default) Use to display the number as entered. You can display up to 11 digits to the right or left of the decimal indicator. If a number contains more than 11 digits, or your control is not wide enough to show all the digits, Access rounds the number. For very large or very small numbers (more than 10 digits to the right or left of the decimal point), Access uses scientific notation.123.456
CurrencyUse to apply the currency symbol and format specified in your Windows regional settings. $123,456
EuroUse to apply the euro symbol () to your numeric data, but otherwise use the currency format specified in your Windows regional settings.€123,456.78
FixedUse to display numbers without thousand separators and with two decimal places. If the value in the field contains more than two decimal places, Access rounds down the number.1234.56
StandardUse to display numbers with thousand separators and two decimal places. If the value in the field contains more than two decimal places, Access rounds down the number to two decimal places.1,234.56
PercentUse to display numbers as percentages with two decimal places and a trailing percent sign. If the underlying value contains more than four decimal places, Access rounds down the value. 123.50%
ScientificUse to display numbers with scientific (exponential) notation.1.23E+04


Predefined formats for Date/Time data type

The following table lists and describes the predefined formats that you can apply to the Date/Time data type (Date/Time data type: An Access database data type that is used to hold date and time information.).
FormatDescriptionExample
General Date(Default) Use to display date values as numbers and time values as hours, minutes, and seconds, followed by AM or PM. For both types of values, Access uses the date and time separators specified in your Windows regional settings. If the value does not have a time component, Access displays only the date. If the value has no date component, Access displays only the time. 08/29/2006 10:10:42 AM
Long DateUse to display only date values as specified by the Long Date format in your Windows regional settings.Monday, August 29, 2006
Medium DateUse to display the date as dd/mmm/yyyy, but use the date separator specified in your Windows regional settings. 29/Aug/2006
29-Aug-2006
Short DateUse to display date values as specified by the Short Date format in your Windows regional settings. 8/29/2005
8-29-2006
Long TimeUse to display hours, minutes, and seconds, followed by AM or PM. Access uses the separator specified in the Time setting in your Windows regional settings. 10:10:42 AM
Medium TimeUse to display hours and minutes, followed by AM or PM. Access uses the separator specified in the Time setting in your Windows regional settings. 10:10 AM
Short TimeUse to display only hours and minutes. Access uses the separator specified in the Time setting in your Windows regional settings. 10:10

Predefined formats for Yes/No data type

Access provides a small set of predefined formats (but does not allow custom formats) for displaying the Yes/No data type (Yes/No data type: A field data type that you use for fields that will contain only one of two values, such as Yes or No and True or False. Null values are not allowed.). You may find it easier to work with check boxes or option buttons than with a Yes or No value in a text box.
FormatDescription
Yes/No(Default) Use to display 0 as No and any nonzero value as Yes.
True/FalseUse to display 0 as False and any nonzero value as True.
On/OffUse to display 0 as Off and any nonzero value as On.

Apply a predefined format

Remember that formats affect only the visual appearance of data and that your Windows regional settings may control part or all of how a predefined format is displayed.
To select and apply a predefined format, do the following:
  1. In the Navigation Pane, right-click the table that you want to change, and then click Design View on the shortcut menu.
  2. Click the field that you want to format, and then, on the General tab, click the cell next to the Format box.
  3. Click the arrow and then select a format in the list. If the list is blank, the data type does not offer any predefined formatting. The Property Update Options smart tag appears.Button image
  4. You can click the Property Update Options smart tag and choose to update the format everywhere the field is used throughout your database (such as a control on a form), or you can limit the format change only to the table.
  5. Save your changes, and then open the table in Datasheet view. If you did not select the format that you wanted in step 3, return to Design view and select another option.
Applying a predefined format to a Number field

Overview of custom formatting options

For data types that do not have predefined formats or when predefined formats do not meet your needs, you can change the display properties by entering sets of literal characters and placeholder characters in a field.






Custom formats for Text and Memo data types

The Text (Text data type: In a Microsoft Access database, this is a field data type. Text fields can contain up to 255 characters or the number of characters specified by the FieldSize property, whichever is less.), Memo (Memo data type: In a Microsoft Access database, this is a field data type. Memo fields can contain up to 65,535 characters.), and Hyperlink (Hyperlink data type: A data type for an Access database field that stores hyperlink addresses. An address can have up to four parts and is written using the following format: displaytext#address#subaddress#.) data types do not accept predefined formats. The Text data type accepts only custom formats, the Memo data type accepts both custom and Rich Text formatting, and the Hyperlink data type accepts custom formats (you can set program options that control the color of links).
Typically, you apply custom formats to Text and Memo data types to make the table data easier to read. For example, if you use a Web form to gather credit card numbers, and you store those numbers without spaces, you can use a custom format to add the appropriate spaces to make the credit card numbers easier to read.
Custom formats for the Text and Memo data types allow only two format sections in a string. The first section of a format string controls the appearance of text, and the second section displays empty values or zero-length strings. If you don't specify a format, Access left aligns all text in datasheets. To learn more about applying a custom format to a Text or Memo field.
The following table lists and explains the custom formats that you can apply to Text and Memo fields.
CharacterDescription
@Use to display any available character for its position in the format string. If Access places all characters in the underlying data, any remaining placeholders appear as blank spaces.
For example, if the format string is @@@@@ and the underlying text is ABC, the text is left-aligned with two leading blank spaces.
&Use to display any available character for its position in the format string. If Access places all characters in the underlying data, any remaining placeholders display nothing.
For example, if the format string is &&&&& and the text is ABC, only the left-aligned text is displayed.
!Use to force placeholder characters to be filled from left to right instead of right to left. You must use this character at the start of any format string.
<Use to force all text to lowercase. You must use this character at the beginning of a format string, but you can precede it with an exclamation point (!).
>Use to force all text to uppercase. You must use this character at the beginning of a format string, but you can precede it with an exclamation point (!).
*When used, the character immediately after the asterisk (*) becomes a fill character — a character used to fill blank spaces. Access normally displays text as left-aligned and fills any area to the right of the value with blank spaces. You can add fill characters anywhere in a format string. When you do so, Access fills any blank spaces with the specified character.
Blank space, + - $ ()Use to insert blank spaces, math characters (+ -), financial symbols ($ ¥ £), and parentheses as needed anywhere in your format strings. If you want to use other common math symbols, such as slash (\ or /) and the asterisk (*), surround them with double quotation marks — note that you can place these characters anywhere in the format string.
"Literal text"Use double quotation marks to surround any text that you want displayed to users.
\Use to force Access to display the character that immediately follows. This is the same as surrounding a character with double quotation marks.
[color]Use to apply a color to all values in a section of your format. You must enclose the name in brackets and use one of these names: black, blue, cyan, green, magenta, red, yellow, or white.

Note When you specify a format, Access fills the placeholder characters with data from the underlying field.

Custom formats for hyperlinks

By default, the Hyperlink data type accepts custom formats, but you can also set program options that control the color of both links and followed hyperlinks (followed hyperlink: A hyperlink to a destination you have visited. Once you follow a hyperlink to its destination, the hyperlink changes color.). Access follows the normal Microsoft Office conventions for formatting hyperlinks. The link text is underlined and in blue color, and the text changes to purple when you click a link. The address in the link also serves as the link text. For example, you cannot enter http://www.contoso.com as the address and use "The Contoso home page" as the link text. Also, when you enter a Web address, Access treats the address as a hyperlink.
To set a custom color for a hyperlink, do the following:
  1. Click the Microsoft Office Button Button image, and then click Access Options. The Access Options dialog box appears.
  2. Click Advanced, and under General, click Web options. The Web Options dialog box appears.
  3. Select the colors that you want to use for unfollowed and followed links. If you don't want Access to underline your links, clear the Underline hyperlinks check box.

Custom formats for the Number data type

You can apply a custom format to any numeric data type (numeric data type: In an Access project, an exact numeric data type that holds values from -10^38 - 1 through 10^38 - 1. You can specify the scale (maximum total number of digits) and precision (maximum number of digits to the right of the decimal point).), and your custom formats can specify text strings and colors. To create a custom format, you enter a variety of characters in the Format property of a table field. The characters consist of placeholders (such as 0 and #), separators (such as periods and commas), literal characters, and colors.
In addition, you can specify formats for four types of numeric values — positive, negative, zero (0), and null (undefined). If you choose to create a format for each type of value, you must place the format for positive values first, the format for negative values second, the format for zero values third, and the format for null values last. Also, you must separate each format with a semicolon.
For example, this string of four custom formats displays positive values with two decimal places and negative values with the same number of decimal places, but in parentheses and red type. It displays zero values as the number 0, always with two decimal places, and displays null values as the word "Undefined." Each of the four sections in the string is separated by a semicolon (;).
#,###.##;(#,###.##)[Red];0,000.00;"Undefined"
The following is a description of each section:
  • The number sign (#) is a placeholder for digits. If the format encounters no values, Access displays a blank space. If you want to display zeroes instead of blank spaces (for example, to display 1234 as 1234.00), you use the number 0 as the placeholder.
  • By default, the first section displays positive values. If you want to use a format with larger values or more decimal places, you can add more placeholders for the decimal value, such as #,###.###. As an example, 1234.5678 is displayed as 1,234.568. Notice that this format uses the comma as the thousands separator and the period as the decimal separator. If the decimal values in the record exceed the number of placeholder characters in the custom format, Access rounds the values and displays only the number of values specified by the format. For example, if your field contains 3,456.789, but its format specifies two decimal places, Access rounds the decimal value to .79.
  • By default, the second section displays only negative values. If your data does not contain negative values, Access leaves the field blank. The preceding example format surrounds any negative values with literal characters — the opening and closing parentheses. It also uses the [Red] color declaration to display any negative values in red type.
  • By default, the third section defines the format for all zero (0) values. In this case, when the field contains a value of zero, 0,000.00 is displayed. To display text instead of a number, you can use "Zero" (surrounded by double quotation marks) instead.
  • By default, the fourth section defines what users see when a record contains a null value. In this case, users see the word "Undefined." You can also use other text, such as "Null" or "****". Keep in mind that surrounding characters with double quotation marks causes the format to treat those characters as literals and display them exactly as you entered them.
Remember that you do not need to use all four sections. For example, if your table field does accept null values, you can omit the fourth section. Also, custom formats affect the visual appearance of your data, but not the way that Access stores your data or the way that users enter data. The next section lists and describes the placeholders and other characters that you can use in custom numeric formats.

Custom format characters for numeric data

The following table lists and describes the placeholders and characters that you can use to create custom formats for numeric data.
CharacterDescription
# Use to display a digit. Each instance of the character represents a position for one number. If no value exists in a position, Access displays a blank space. Also, the use of placeholders does not prevent you from entering data.
For example, if you apply the format #,### and enter a value of 45 in the field, 45 is displayed. If you enter 12,145 in a field, Access displays 12,145 — even though you defined only one placeholder to the left of the thousands separator.
0Use to display a digit. Each instance of the character represents a position for one number. If no value exists in a position, Access displays a zero (0).
Thousands and decimal separatorsUse to indicate where you want Access to place the thousands and decimal separators. Access uses the separators that are defined for your Windows regional settings.
blank spaces, + - $ ()Use to insert blank spaces, math characters (+ -), and financial symbols (¥ £ $) as needed anywhere in your format strings. If you want to use other common math symbols, such as slash (\ or /) and the asterisk (*), surround them with double quotation marks. Note that you can place them anywhere.
"Literal text"Use double quotation marks to surround any text that you want users to see.
\Use to force Access to display the character that immediately follows. This is the same as surrounding a character with double quotation marks.
!Use to force the left alignment of all values. When you force left alignment, you cannot use the # and 0 digit placeholders, but you can use placeholders for text characters.
*Use to force the character immediately following the asterisk to become a fill character — a character used to fill blank spaces. Access normally displays numeric data as right-aligned, and it fills any area to the left of the value with blank spaces. You can add fill characters anywhere in a format string, and when you do so, Access fills any blank spaces with the specified character.
For example, the format £##*~.00 renders a currency amount as £45~~~~~.15. The number of tilde characters (~) displayed in the field depends on the number of blank spaces in the table field.
%Use as the last character in a format string. Multiplies the value by 100 and displays the result with a trailing percent sign.
E+, E-
–or–
e+, e-
Use to display values in scientific (exponential) notation. Use this option when the predefined scientific format doesn't provide enough room for your values. Use E+ or e+ to display values as positive exponents, and E- or e- to display negative exponents. You must use these placeholders with other characters.
For example, suppose you apply the format 0.000E+00 to a numeric field and then enter 612345. Access displays 6.123E+05. Access first rounds the number of decimal places down to three (the number of zeroes to the right or left of the decimal separator). Next, Access calculates the exponent value from the number of digits that fall to the right (or left, depending on your language settings) of the decimal separator in the original value. In this case, the original value would have placed "612345" (five digits) to the right of the decimal point. For that reason, Access displays 6.123E+05, and the resulting value is the equivalent of 6.123 x 105.
[color]Use to apply a color to all values in a section of your format. You must enclose the name in brackets and use one of these names: black, blue, cyan, green, magenta, red, yellow, or white.

Custom formats for the Date/Time data type

If the predefined formats described in Predefined formats for Date/Time data type do not meet your needs, you can use custom formats.
If you don't specify a predefined or custom format, Access applies the General Date format — m/dd/yyyy h:nn:ss AM/PM.
Custom formats for Date/Time fields can contain two sections — one for dates and another for times — and you separate the sections with a semicolon. For example, you can re-create the General Date format as follows: m/dd/yyyy;h:nn:ss.
CharacterDescription
Date separatorUse to control where Access places the separator for days, months, and years. Access uses the separator defined in your Windows regional settings.
cUse to display the general date format.
d or ddUse to display the day of the month as one or two digits. For one digit, use a single placeholder. For two digits, use two placeholders.
dddUse to abbreviate the day of the week to three letters.
For example, Monday appears as Mon.
ddddUse to spell out all days of the week.
dddddUse to display the Short Date format.
ddddddUse to display the Long Date format.
wUse to display the number of the day of the week.
For example, Monday appears as 2.
m or mmUse to display the month as either a one-digit or two-digit number.
mmmUse to abbreviate the name of the month to three letters.
For example, October appears as Oct.
mmmmUse to spell out all month names.
qUse to display the number of the current calendar quarter (1-4).
For example, for a date in May, Access displays 2 as the quarter value.
yUse to display the day of the year (1-366).
yyUse to display the last two digits of the year.
Note We recommend entering and displaying all four digits of a given year.
yyyyUse to display all digits in a year in the range 0100-9999.
Time separatorUse to control where Access places the separator for hours, minutes, and seconds. Access uses the separator defined in your Windows regional settings.
h or hhUse to display the hour as one or two digits.
n or nnUse to display minutes as one or two digits.
s or ssUse to display seconds as one or two digits.
tttttUse to display the Long Time format.
AM/PMUse to display 12-hour clock values with a trailing AM or PM. Access relies on the system clock in your computer to set the value.
A/P or a/pUse to display 12-hour clock values with a trailing A, P, a, or p. Access relies on the system clock in your computer to set the value.
AMPMUse to display 12-hour clock values. Access uses the morning and afternoon indicators specified in your Windows regional settings.
Blank space, + - $ ()Use to insert blank spaces, math characters (+ -), financial symbols ($ ¥ £), and parentheses as needed anywhere in your format strings. If you want to use other common math symbols, such as slash (\ or /) and the asterisk (*), surround them with double quotation marks. Note that you can place them anywhere.
"Literal text"Use double quotation marks to surround any text that you want users to see.
\Use to force Access to display the character that immediately follows. This is the same as surrounding a character with double quotation marks.
*Use to force the character immediately following the asterisk to become a fill character — a character used to fill blank spaces. Access normally displays text as left aligned and fills any area to the right of the value with blank spaces. You can add fill characters anywhere in a format string. When you do so, Access fills any blank spaces with the specified character.
[color]Use to apply a color to all values in a section of your format. You must enclose the name in brackets and use one of these names: black, blue, cyan, green, magenta, red, yellow, or white.


Apply a custom format

To apply a custom format, do the following:
  1. In the Navigation Pane, right-click the table that you want to change, and then click Design View on the shortcut menu.
  2. Select the field that you want to format, and on the General tab, click the cell next to the Format box.
  3. Enter your format. Remember that the type of format that you can enter depends on the data type that is set for the field you selected in step 2.
  4. Press CTRL+S to save your work.
If you applied a custom format to a Text or Memo field, test your formatting. The following steps suggest some ways to test:
  • Enter uppercase or lowercase values, and see how the format treats the data. Do the results make sense?
  • Enter values that are longer or shorter than you anticipate (with and without separators), and see how the format behaves. Does the format add either unwanted blank spaces or leading or trailing spaces, or unexpected characters?
  • Enter a zero-length string or a null value, and see whether you like the result.
After you apply a custom format to a Number field, you can test the format by doing any or all of the following:
  • Enter values without thousands separators or decimal separators, and see how the format treats the data. Does the format put the separators in the correct places?
  • Enter values that are longer or shorter than you anticipate (with and without separators), and see how the format behaves. Does the format add either unwanted blank spaces or leading or trailing zeroes?
  • Enter a zero or a null value in a format meant for positive or negative values, and see whether you like the result.

Apply Rich Text formatting

If you have a Memo data type (Memo data type: In a Microsoft Access database, this is a field data type. Memo fields can contain up to 65,535 characters.), you can set the field to support Rich Text formatting. First, set the table fields that you want to format to the Memo data type, and change theText Format property for the field from Plain Text to Rich Text.
For example, you can make some or all of the text bold, or change the text colors. You can apply Rich Text formatting to the data in tables and query result sets. You can also apply Rich Text formatting to the data in any text boxes that you bind to your Memo fields.
You format your data by using the formatting tools that are common to other Microsoft Office programs, such as Word and PowerPoint.
Access Ribbon
Access Ribbon
To enable Rich Text formatting for an existing table with data, you might also need to turn off the Append Only property for the Memo field. Also, if the text in the Memo field seems to disappear when you point to it, you need to turn off the Append Only property.
  1. In the Navigation Pane, right-click the table that you want to change, and then click Design View on the shortcut menu.
  2. Select the Memo field that you want to change, and under Field Properties, on the General tab, scroll down to the Append Only property box.
  3. Click the cell next to the Append Only property box, and click No in the list.
The following procedure shows you how to enable Rich Text formatting for a Memo field and also how to apply formatting to part or all of a record. This procedure applies to database files in the .accdb file format and the .mdb file format. The procedure does not apply to Access projects (.adp files) or to data access pages.
  1. Open the table in Design view.
  2. Select the Memo field for which you want to enable Rich Text formatting.
  3. Under Field Properties, click the General tab. In the cell next to Text Format, select Rich Text.
  4. If a message appears, click Yes to close the message, and then save the table.
  5. Switch to Datasheet view, and enter some text in the Memo field.
  6. To apply Rich Text formatting, select the text that you want to format.
  7. On the Home tab, use the controls in the Font group to apply the formatting that you want.
    Some of the formats that you can apply include font size, making the text bold, and applying a color to the selected text.
You can use the Rich Text Format property commands in Form view (Form view: A window that displays a form to show or accept data. Form view is the primary means of adding and modifying data in tables. You can also change the design of a form in this view.), Datasheet view (Datasheet view: A window that displays data from a table, form, query, view, or stored procedure in a row-and-column format. In Datasheet view, you can edit fields, add and delete data, and search for data.), Layout preview (Layout preview: A preview of a report that uses a minimum amount of data to display the general layout of the report. Click Print Preview to display the exact data that appears in the report.), and Design view (Design view: A window that shows the design of these database objects: tables, queries, forms, reports, macros, and data access pages. In Design view, you can create new database objects and modify the design of existing ones.).
If you don't have a mouse or other pointing device, you can press ALT to move the focus to the Home tab or to the Ribbon, which is part of the Microsoft Office Fluent user interface. You can use the arrow keys to move to the tab, group, and control. After you select the control, press ENTER to make your changes.

Apply a display format to an input mask

You can define an input mask and then apply a separate display format to the same data. For example, you can define an input mask that guides users to enter dates in a European format such as YYYY.MM.DD, but you can apply a display format that entirely rearranges the year, month, and day. For example, the Medium Date display format renders dates as DD-MMM-YYYY, or 24-Aug-2006, regardless of how the input mask was set originally. If you have an input mask and a format defined for a table field, the input mask appears when the field has the focus, and the format appears when you put the focus on another field.
In the following illustration, a date mask is applied to the Invoice Date field, and the Long Date format is applied to the field's Format property.
Applying a format and an input mask to a field
In Datasheet view, the user is forced to enter a value in the Invoice Date field as 04/30/2007 because of the Short Date input mask, but when the focus is moved away from the field, the date is displayed in the Long Date format as April 30, 2007, because the field's Format property is set to Long Date.
Invoice Date field in Datasheet View with formating applied to input mask
If you defined an input mask but did not apply a format, Access uses the input mask format when it displays the data. Input masks and display formats can sometimes interfere with each other. In the following example, the string (&&&) @@@-@@@@ was entered as the Format property in a field that contains an input mask that is set to Phone Number.
Format properties for input mask display
When you view the field in Datasheet view, Access displays the following format.
Display of input mask format in Datasheet view
If you apply a display format to a field that has an input mask, Access uses the input mask setting when you add or edit records and then applies the display format after you save the record.
For more information about defining an input mask, click the InputMask property box, and then press F1

0 comments |

Labels

Blog Archive

Powered by Blogger.

I made these pages for me and my friends to help solving the problem we face regarding Computer & internet, if anyone wants me to answer a question or find out about some information please send me email and I will try to reply.*P.S. some of the article I wrote and the other I found on the internet I posted them in sprit of learning and shearing, please forgive me if you found something you don’t want to be in my blog, email me and I will delete them. Thank you for your interest in my pages.امل نجم Amal Nagm

banner 1 banner 2