Access 2010 has the ability to add objects to a field with OLE data type. In the case where the data type is specified as OLE (Object Linking and Embedding– object binding and embedding), then the Access DBMS retains the external an object V shared file database, allocating for its storage as much space as this object occupies in the form of a separate file. Under objects should be understood as files created as applications in graphic editors, video clips, in MS Office applications, etc. When a table is filled with data that is an object, a message about the program that can be used to open this object is generated in the corresponding position of the field with the OLE data type. Displaying an object will be carried out only in forms and reports.

For embedding an object in the field with OLE data type you need to open the table in "Constructor" mode. Add a new field, for example “Product photo.” Select data type "OLE Object Field", and then save the table.

Then in "Table" mode in the line for entering data, click the right mouse button, in the menu that opens, select the line with the command, which will open a dialog box (Fig. 3.38, Fig. 3.39).

Rice. 3.38 Inserting an object

Rice. 3.39 Dialog box for adding a new object to an Access table

Remember that there are two options for embedding objects as data. The first option involves using standard applications to create a file that Access supports, the second option is to insert an object, which allows you to use any file as a data source (Fig. 3.40).

Rice. 3.40 Adding a new object to an Access table from a file

1. Creating an object from a file.

When it comes to data, which are objects for the database, and are external files, then you need to have these files. Therefore, you will need to create several files in order to see how they are displayed in the database in the future, and also try to change these files. For example, if you have a photograph of an object in the file Monitor.jpg(jpg is a universal photo format). In order for this file to be saved in the database, you should check the box (Fig. 3.40) "Create from file", after which the window shown in Figure 3.41 will appear. Using a button "Review" you should select the required file.

Rice. 3.41 Finding a file when creating an object in the database

In the corresponding line for the field, for example, "Product photo" the word will appear "Package", this means that the file is tied to the application that created it. Therefore, when viewing a database, whether it be a query, a form, or a report, the user will see an image of the file as an icon, and when double click Using this image, the system will first find the application, and then display the contents of the file in it (in in this example this photo). The exception is image files saved with the extension .bmp(bit map format). However, it should be recalled that files created in Microsoft applications will be displayed immediately in forms and reports. The conclusion is simple, photographs can be inserted into applications such as Paint, Word, Power Point, and saved as separate files, and then connect as an object to the database. Try creating multiple photo and text files using different Windows editors. For example, you can open Word document, insert a photo from the file, add text, and then save as: Monitor.docx(Fig. 3.42).

Rice. 3.42 Photo file created in Word

2. Creation of new objects.

By creating new objects in the database, you should mean using an application in which the file is created and then included in the field describing the type of this OLE. To start the mode for creating new objects, you need to open the table in "Table" mode, select option "Create new" in the dialog box (Fig. 3.39), and then select in the list "Object type" (required application). The list of applications that Access supports for creating an object is in the list (Fig. 3.43), which will open after running the command "Insert object" .

Rice. 3.43 List of Access object types that can be used to create files

The convenience of using applications to create objects in the form of files is that in the future these files can be used autonomously or corrected in the database.

Let's consider object creation option for the database, using paint applications

For example, it is necessary to create an object with an image of a company and text, which the database user can later replace or correct. To do this you need to select from the list Bitmap Image object, further technology for creating an object is shown in Figure 3.44.

1. Open the Paint application

2. Insert a photo from a file.

3. Add text (if necessary).

4. Save as a file.

5. Close the application.

Rice. 3.44 Technology for creating an object in the Paint application

Exercise 3.11

1. In the table " Goods» in mode "Constructor" add a new column named "Product photo", data type " OLE Object Field", save changes.

2. In mode "Table" in field "Product photo" select a line "Insert object from file", select (put a dot) "Create new" and from the drop-down list specify document Microsoft Word . This will open text editor MS Word, here you need to insert a picture corresponding to the product in this line. Select pictures from the list that is stored directly in the editor (the “Insert” tab, the “Picture” icon, the “Start” button in the dialog box on the right), or insert a picture from other programs. You can use the Paint application (Bitmap Image object), where you can draw the product yourself. Close the created file, it will automatically be linked to your database, to the line in which it was inserted.

3. Follow this procedure for all lines yours "Products" tables.

4. Save your changes.

Control questions

1. What objects can be inserted into a database with an OLE data type?

2. How can I insert a photo into a table in Table mode?

3. Where will the photo appear in the database?

4. How is the “Create” method different? new object» from the “Create from file” method?

5. How to place a product photo file in the database if it has the extension .png?

6. Is it possible to edit a file that is inserted as an object into the database directly in file system computer?

7. How to insert a presentation into the database?

8. Which application objects can be inserted into the database?

A cell in a Boolean field can only contain one of two values: Yes or No. Access offers two other options for Boolean type names: True/False and On/Off. Regardless of which field format you choose, the logical field will be represented in the table as a set of checkboxes. When you click a checkbox with your mouse, it causes a checkmark image to appear in the square, which corresponds to the Boolean value Yes

Clearing the checkbox means setting the cell field to the Boolean value No. The use of boolean fields can be different, for example in questionnaires or to create controls.

OLE Object Field

OLE (Object Linking and Embedding) object field is the last field type to be selected from the list. It has only two properties: a signature and a “required field” parameter. Fields of this type do not store information as such, but contain links to objects that can be included in the database using the OLE data exchange protocol. Such objects can be, for example, graphic files.

In order to embed an OLE object in a field cell, you need to place the cursor on it and, by clicking the right mouse button, call context menu. In it, select the Insert object command. The program will open a dialog box to select the object type. The object in this case is identified with the application in which it can be created or edited.

The second option for inserting an object is to select the Create from file radio button in the Insert Object window. In this case, it is assumed that the file already exists, and you need to establish a connection with it. Access will open a document open window and after selecting the desired file will determine which application needs to be opened to work with it.

Text or a combination of text and numbers used as a hyperlink address.

Address is text that specifies the path and file name for the document to be opened. The path can be a path to a file stored on your hard drive, a UNC address, or an Internet URL.

You can use the Hyperlink command on the Insert menu to insert an address into a field.

Multi-table databases. Relationships between tables

Relational databases consist of several tables, the relationship between which is established using matching fields. Each entry in the tables identifies one object. The relationship between objects defines the relationship between tables. There are 4 types of relationships:

1. A one-to-one relationship means that each record in one table corresponds to only one record in another table. One citizen of a country corresponds to only one passport number, while one passport number corresponds to only one person.

2. A one-to-many relationship means that for every record in one table there is a corresponding one or more records in another table. One applicant can enter many universities and at the same time many applicants can enter one university.

3. A many-to-many relationship occurs between two tables when:

One record from the first table can be associated with more than one record from the second table;

One record from the second table can be related to more than one record from the first table.

For example, communication between teachers and groups of students. Several teachers teach classes in several groups, and several groups are taught by several teachers.

In most cases, any two tables are related in a one-to-many relationship.

Creating relationships between tables

In order to consider creating connections between tables, let’s create two more tables in the “Professional Consultant” database:

1. Table of applicants:

CodeAb is the key field.

2. Table of intersection tSvyazAbVUZ:

The first two fields are key, and for the tSvyaz-Abvuz table they are foreign keys.

Figure 12.6. Data Schema

To define connections, you must use the Tools->Data Schema command (button

). If a relationship is defined for the first time in a database, Access opens an empty Data Schema window and then displays the Add Table dialog box. In this window, you need to select the required tables and click the Add button. In our case, we need to add all three tables to the data diagram window. The Close button closes the Add Table dialog box (this window can be called by clicking the button

). After this, the Data Schema window should look something like the one shown in Fig. 3 (except connection lines). To establish a connection between the tvuz and tSvyazAbvuz tables, you need to select the Code vuz field in the tvuz table (click with the left mouse button), drag and drop it onto the Code vuz field in the tSvyazAbvuz table. Similarly, a connection is established between two other tables.

When you release the mouse button, Microsoft Access will open the Connections dialog box shown in Fig. 12.7.

Figure 12.7. Setting up relationships between table fields

After you select the Ensure Data Integrity check box, Access makes two more options available: Cascade Update Related Fields and Cascade Delete Related Records. When the Cascade Update Related Fields check box is selected, Microsoft Access updates all foreign key values ​​in child tables (that is, tables on the many side of a one-to-many relationship) when the value of the primary key in the parent table that is on the side of the relationship changes "one" in a one-to-many relationship. If you select the Cascade delete related records check box, Microsoft Access will delete child rows (related rows in child tables) when you delete the parent row (related row in a parent table). Select the Cascading update of related fields check box so that when the university code changes, Access automatically updates the records in the ContactAbvuz table.

After you click Create, Access will create a relationship and draw a line between the two tables to indicate that they are related. Note that when you ask for data integrity, Access displays a 1 at the end of the line for the table on the one side of the relationship, and an infinity symbol at the other end of the line for the table on the many side of the relationship. To delete a link, click on its line and press the Del key. If you want to edit or change existing connection, double-click on the corresponding line to open the Links dialog box again.

Logical format

Currency format

Number format

Text format

Data types

The text field size can range from 1 to 255 characters.

The numeric field type can accept values ​​from the following list:

byte- integers ranging from 0 to 4,255;

whole- integers from - 32768 to 32767;

long integer - integers from - 2147483648 to 2147483647;

floating point (4 bytes)- numbers ranging from - 3.402823E38 to 3.402823E38;

floating point (8 bytes) - numbers ranging from minus 1.79769313486232E308 to plus 1.79769313486232E308.

Date/Time Format

For data type Date Time There is a set of field formats given below along with examples:

Full format (set by default) 04/15/94 05:30:10 RM

Short date format 04/15/94

Long time format 17:30:10

Average time format 05:30 RM

Short time format 17:30

By default, the currency format is numbers written with two decimal places, separated by digit groups and notated "R." at the end. The user can write in the line Field Format template for your format. Let's say you need to enter dollar amounts. Then you need to place the cursor on the word Monetary and replace it with a format template, for example, like this: # ###$ .

Counter format

Fields of the “counter” type perform a specific function - automatic identification of table records. Therefore, such a field has few properties that could be changed. First of all, a counter is always a number. Secondly, its value increases automatically. Access offers two options for changing the counter: consistent And random. The first option is convenient because it allows you to number entries. The second option can be used if you need to create a system for encoding records in a table that is protected from careless operator actions.

A cell in a Boolean field can only contain one of two values: Yes or No. Access offers two more options for naming Boolean types: True/False And On/Off. Regardless of which field format you choose, the logical field will be represented in the table as a set of checkboxes. When you click a checkbox with your mouse, it causes a checkmark image to appear in the square, which corresponds to a boolean value Yes. Resetting a checkbox means assigning a Boolean value to a cell field No. The use of boolean fields can be different, for example in questionnaires or to create controls.

OLE Object Field(Object Linking and Embedding) - the last field type selected from the list. It has only two properties: a signature and a “required field” parameter. Fields of this type do not store information as such, but contain links to objects that can be included in the database using the OLE data exchange protocol. Such objects can be, for example, graphic files.



In order to embed an OLE object in a field cell, you need to place the cursor on it and, by clicking the right mouse button, call up the context menu. Select the command there Insert object. The program will open a dialog box to select the object type. The object in this case is identified with the application in which it can be created or edited.

The second option for inserting an object is selecting the radio button Create from file in the window Inserting an object. IN In this case, it is assumed that the file already exists and you need to establish a connection with it. Access will open a document opening window and, after selecting the desired file, determine which application needs to be opened to work with it.

Boolean fields

Boolean fields are used to store data that can take one of two possible values. The Boolean field Field Format property allows you to use custom formats or one of three built-in formats: True/False, Yes/No, or On/Off. In this case, the values ​​True, Yes and On are equivalent to the logical value True, and the values ​​False, No and Off are equivalent to the logical value False.

If you select a built-in format and then enter an equivalent Boolean value, the entered value will be displayed in the selected format. For example, if the value True or On is entered into a Field control that has the Field Format property set to Yes/No, the entered value is immediately converted to Yes.

When creating a custom format, remove the current value from the Format property and enter your own format.

Free-length text fields

Free-length text fields (MEMO fields) can contain the same data types as simple text fields. The difference between these fields is that the length of MEMO fields can be very large compared to the size of text fields. May contain long text or a combination of text and numbers.

OLE Object Fields

MS Access allows you to store in tables images and other binary data (for example, an MS Excel spreadsheet, an MS Word document, a picture, a sound recording) linked or embedded in a Microsoft Access table. For these purposes, the OLE Object Field data type is used. The actual amount of data you can enter in a given field type is determined by the amount hard drive Your computer (up to 1 Gigabyte).

Lookup wizard data type

Selecting this data type launches the Lookup Wizard, which creates a field that offers a choice of values ​​from a drop-down list containing a set of constant values ​​or values ​​from another table. Selecting this option from the list in a cell launches the Lookup Wizard, which determines the field type.

Every table in Access is made up of fields. Field properties describe the characteristics and behavior of the data added to it. The data type of a field is the most important property that determines what data can be stored in the field. This article describes the data types and other field properties available in Access and provides information about Additional Information See the data types reference section.

In this article

General information

Sometimes the data types may not be obvious, for example, a field with the Text data type may store data consisting of text and numbers. But a field with a Number data type can only store numeric data. So you need to know which properties are used for each data type.

The data type of a field determines many other important characteristics of the field, including:

    formats that can be used in the field;

    the maximum size of the value in the field;

    how the field is used in expressions;

    possibility of field indexing.

Depending on how you create a new field, the field's data type may be predefined or selectable. For example, if when creating a field in Datasheet view you:

    you use an existing field from another table, the data types are already defined in it or in the template;

    enter data in a blank column (or field), Access assigns a data type to the field based on the values ​​you enter, or you can assign a data type and format to the field;

    on the tab Changing fields in Group Fields and Columns choose a team Add fields Access displays a list of data types to choose from.

When to use which data type?

A field's data type can be thought of as a set of characteristics that apply to all values ​​in that field. For example, values ​​in a text field can only contain letters, numbers, and some punctuation. Additionally, the text field can contain a maximum of 255 characters.

Advice: Sometimes it looks like the data in a field is one type, but in fact it is data of a different type. For example, a field appears to contain numeric values, but is actually text values ​​representing room numbers. Often to compare or convert values ​​with different types expressions are used in the data.

The tables below show the formats available for each data type and describe the formatting results.

Main types

Format

Displayed data

Text

Short alphanumeric values, such as last name or postal address. Please note that as of Access 2013, the text data type has been renamed to Short text.

Numeric, Large number

Numeric values, such as distances. Remember that there is a separate data type for monetary values.

Monetary

Monetary values.

Logical

Values ​​"Yes" and "No", as well as fields containing only one of the two values.

date and time

Date and time values ​​from 100 to 9999 years.

Rich text

Text, or a combination of text and numbers, that is formatted with color and font controls.

Calculated field

Calculation results. A calculation can reference other fields in the same table. Calculations are created using the Expression Builder. Calculated fields first appeared in Access 2010.

The attachment

Attached images, spreadsheet files, documents, charts, and other supported file types in database records (as in messages Email).

Text or a combination of text and numbers saved as text and used as a hyperlink address.

MEMO field

Long blocks of text. A typical example of using a MEMO field is detailed description product. Please note that as of Access 2013, the MEMO data type has been renamed to Long Text.

Substitution

A list of values ​​that are returned from a table or query, or a set of values ​​that you specified when you created the field. The Lookup Wizard starts, allowing you to create a lookup field. Depending on the selections you make in the wizard, the data in the lookup field can be text or numeric.

Lookup fields have an additional set of properties that are found on the Substitution in area Field properties.

Note: Attachments and calculated data are not available in MDB files.

Numerical

Format

Displayed data

Are common

Numbers without additional formatting (exactly as they are stored).

Monetary

Regular monetary values.

Euro

Regular monetary values ​​in EU format.

Fixed

Numeric data.

Standard

Numeric data with decimal places.

Percent

Values ​​are in percentages.

Exponential

Computing.

date and time

Format

Displayed data

Short date format

Date in short format. Depends on regional date and time settings. For example, 03/14/2001 for Russia.

Medium date format

Long date format

Date in long format. Depends on regional date and time settings. For example, March 14, 2001 for Russia.

Time (12 hours)

Time is in 12-hour format only, which will accommodate changes in regional date and time settings.

Medium time format

Time in 12-hour format, followed by AM (am) or PM (after noon).

Time (24 hours)

Time is in 24-hour format only, which will accommodate changes in regional date and time settings.

Logical

OLE object OLE objects, such as Word documents.

Field Size property

After you create a field and specify a data type for it, you can configure additional field properties. Set available additional properties depends on the data type of the field. For example, you can adjust the size of a text field using the property Field size.

For numeric and currency fields, the property Field size is especially important because it determines the range of field values. For example, a one-digit numeric field can only contain integers in the range 0 to 255.

Property Field size also determines how much disk space each numeric field value takes up. Depending on the field size, a number can occupy 1, 2, 4, 8, 12 or 16 bytes.

Note: Variable size values ​​are possible in MEMO fields and text fields. For these data types, the property Field size specifies the maximum size of available space for a single value.

Data types in relationships and joins

A table relationship is a relationship between common fields in two tables. The relationship can be one of the following types: one to one, one to many, many to many.

A join is an SQL operation that combines data from two sources into a single record in a query recordset based on the values ​​of a specified common field in the sources. A join can be one of the following types: inner join, left outer join, right outer join.

When you create a relationship between tables or add a join to a query, the data types in the fields being joined must be the same or compatible. For example, you won't be able to create a join between a number field and a text field, even if the values ​​in those fields are the same.

When using a link or join, fields with the Counter data type are compatible with fields of the numeric type if the property Field size last set value Long integer.

You cannot change the data type or property of a field that is involved in a relationship between tables. Field size. To change a property Field size, temporarily remove the connection. But after you change the data type, you won't be able to create the relationship again until you change the data type of the related field. additional information For information about tables, see the article Understanding Tables.

Data Type Reference

The data type applied to a field contains a set of properties that you can select. For more information, click data types below.

The attachment

Purpose. Used in a field that allows you to attach files and images to a post. For example, if you have a database of work contacts, you can use the attachment field to attach resumes or photos of contacts. For some file types, Access compresses attachments that you add. The Attachment data type is only available in ACCDB format databases.

Types of attachments compressed in Access

When you attach any of the following file types to a database, Access compresses it.

    Bitmaps, such as BMP files

    Windows metafiles, including EMF files

    EXIF files

  • TIFF files

You can put the most into a recording different files. But some types of files may pose a threat and are therefore blocked. Typically, you can attach any file created in one of the applications Microsoft Office, as well as log files (LOG), text files(TEXT, TXT) and compressed ZIP files. For a list of supported image file formats, see the table later in this section.

List of blocked file types

Access blocks the following types of attached files:

Counter

Purpose. The counter field allows you to specify a unique value, that is, it is used for only one purpose - to make each record unique. The most common use of this field is as a primary key, especially if there is no suitable natural key (a key based on the data field).

The value in the counter field takes from 4 to 16 bytes depending on the property value Field size.

Let's say you have a table that stores contact data. You can use contact names as the primary key for this table. But how to handle two contacts with the same names? Names are not suitable as primary keys because they are often not unique. By using the counter field, each record is guaranteed to have a unique identifier.

Note: Do not use the counter field to store the number of records in a table. Counter values ​​are not reused, so when records are deleted, there are gaps in the count. And the exact number of records can be easily obtained using the totals line in the table view.

Supported Field Properties

Property

Usage

Field size

Determines the amount of space allocated for each value. Only two values ​​are allowed for counter fields.

    The Long Integer value is used for counter fields that are not used as replication identifiers. This is the default value. It should only be changed if you are creating a replication ID field.

    Note: Replication is not supported in newer database formats such as ACCDB.

    This value makes counter fields compatible with other Long Integer numeric fields when used in relationships and joins. Each field value takes 4 bytes.

    Meaning Replication code applies to counter fields that are used as replication identifiers in a database replica. Use this value only if you are running or implementing a replicated database design.

    Each field value takes 16 bytes.

New values

Determines whether the counter field should be incremented with each new value or whether random numbers should be used. Select one of the options below.

    Consistent. Values ​​start at 1 and increase by 1 for each new entry.

    Random. It starts with a random value and assigns a random value to each new entry. The values ​​are of size Long Integer and fall in the range –2,147,483,648 to 2,147,483,647.

Format

When using a counter field as a primary key or replication identifier, this property should not be set. Otherwise, select an appropriate number format.

Signature

Indexed

    Yes (matches allowed).

    No.

Note: Without a unique index, you can enter duplicate values, which can break the relationships of which the key is a part.

Using property Indexed

Smart tags

Text alignment

Computable

Purpose. Used to store calculation results.

A calculation can reference other fields in the same table. Calculations are created using the Expression Builder. Computed data types were first introduced in Access 2010. The calculated data type is only available in ACCDB format databases.

Supported Field Properties

Property

Usage

Expression

The result of this calculation will be stored in a calculated column. If this column has been saved, then only saved columns can be used in this expression.

Result type

The data type that is used to display the result of a calculation.

Format

Most often the meaning Format is set according to the result type.

Number of decimal places

Signature

The signature text that appears by default for this field on forms, reports, and queries. If this property is not specified, the field name is used. Any text string is valid.

Short captions are most effective.

Text alignment

Determines the default alignment of text in a control.

Monetary

Purpose. Used to store monetary data.

Data in the currency field is not rounded during calculations. The value in the currency field contains up to 15 digits to the left of the decimal point and 4 digits to the right. Each currency field value takes 8 bytes.

Supported Field Properties

Property

Usage

Format

Determines how a field appears in tables, forms, and related reports when displayed on screen or printed. Any valid number format can be used. Most often for properties Format value is set Monetary.

Number of decimal places

Determines the number of decimal places to display.

Input mask

Signature

The signature text that appears by default for this field on forms, reports, and queries. If this property is not specified, the field name is used. Any text string is valid.

Short captions are most effective.

Default value

Condition on value

Error message

Mandatory

Indexed

Indicates whether the field is an index. There are three possible values.

    Yes (no overlap allowed). A unique index is created for the field.

    Yes (matches allowed). A non-unique index is created on the field.

    No. All indexes from the field are removed.

Note: Do not change this property for a field that is used as a primary key.

Using property Indexed It is possible to create an index on a single field, but this is not possible for all index types. For example, you cannot use this property to create an index on multiple fields.

Smart tags

Adds a smart tag to the field. Smart tags have been deprecated since Access 2013.

Text alignment

Determines the default alignment of text in a control.

date and time

Purpose. Used to store date and time values.

Supported Field Properties

Property

Usage

Signature

The signature text that appears by default for this field on forms, reports, and queries. If this property is not specified, the field name is used. Any text string is valid.

Short captions are most effective.

Default value

Automatically sets this field to the specified value when a new record is added.

Format

Determines how a field appears in tables, forms, and related reports when displayed on screen or printed. You can use a built-in format or create your own.

List of built-in formats

    Full date format. By default, if the value is only a date, then no time is displayed, and if the value is only a time, then no date is displayed. This value is a combination of the short date format and the long time format.

    Examples

    • 03.04.2007 17:34:00

    Long date format. Corresponds to the long date format defined in regional Windows settings. Example: Saturday, April 3, 2007

    Short date format. Corresponds to the short date format defined in the Windows regional settings. Example: 04/03/2007.

    Warning: If the regional settings are set to short format dates "dd.mm.yy", it is assumed that dates from 01/01/00 to 12/31/29 belong to the twenty-first century (that is, these are the years from 2000 to 2029), and dates from 01/01/30 to 12/31/99 - to the twentieth century (that is, these are the years from 1930 to 1999).

    Long time format. Corresponds to the parameter on the tab Time in Windows regional settings. Example: 17:34:23.

    Medium time format. Time in hours and minutes, with time separator, followed by AM or PM. Example: 5:34 PM.

    Short time format. Time in hours and minutes with time separator in 24-hour format. Example: 17:34.

List of elements that can be used in custom formats

To create a custom format, specify any combination of the following elements. For example, to display the week of the year and the day of the week, enter nn/n.

Important: Custom formats that are incompatible with the date and time settings specified in Windows regional settings are ignored. For more information about Windows regional settings, see Windows Help.

Separator elements

Note: Separators are defined in Windows regional settings.

: Time component separator. For example, hh:mm

. Separate date components. For example, mm.yyyy

Any short string of characters enclosed in quotation marks ( "" ) Custom delimiter. Quotes are not displayed. For example, when you enter "," a comma is displayed.

Date Format Elements

d The day of the month, consisting of one or two digits (from 1 to 31).

dd The day of the month, consisting of two digits (from 01 to 31).

ddd Abbreviated name of the day of the week (Mon – Sun).

ddddd Full name of the day of the week (Monday - Sunday).

n Number of the day in the week (from 1 to 7).

nn Week number in the year (from 1 to 53).

M Month number, consisting of one or two digits (from 1 to 12).

MM Month number, consisting of two digits (from 01 to 12).

MMM The first three letters of the name of the month (Jan - Dec).

MMMM Full name of the month (January – December).

To Number of the quarter in the year (from 1 to 4).

G Number of the day in the year (from 1 to 366).

yy The last two digits of the year number (01 to 99).

yyyy Full year number (from 0100 to 9999).

Time Format Elements

h Hour value, consisting of one or two digits (from 0 to 23).

hh Hour value, consisting of two digits (from 00 to 23).

m A minute value consisting of one or two digits (from 0 to 59).

mm Minute value, consisting of two digits (00 to 59).

With Seconds value, consisting of one or two digits (0 to 59).

ss Seconds value, consisting of two digits (from 00 to 59).

Clock Format Elements

AM/PM 12-hour time format with the addition of capital letters "AM" or "PM" (for example, 9:34 PM).

am/pm 12-hour time format with the addition of lowercase "am" or "pm" (for example, 9:34 pm).

A/P 12-hour time format with the addition of capital letters "A" or "P" (for example, 9:34 P).

a/p 12-hour time format with the addition of lowercase letters "a" or "p" (for example, 9:34 p.m.).

AMPM 12-hour time format using the appropriate AM/PM designator defined in the Windows regional settings.

Built-in formats

c Same as built-in full format dates.

ddddd Same as the built-in short date format.

dddddd Same as the built-in long date format.

ttttt Same as built-in long time format.

IME mode

IME Suggestion Mode

Indexed

Indicates whether the field is an index. There are three possible values.

    Yes (no overlap allowed). A unique index is created for the field.

    Yes (matches allowed). A non-unique index is created on the field.

    No. All indexes from the field are removed.

Note: Do not change this property for a field that is used as a primary key.

Using property Indexed It is possible to create an index on a single field, but this is not possible for all index types. For example, you cannot use this property to create an index on multiple fields.

Input mask

Allows you to display special characters to control data entry. For example, an input mask might display a dollar sign ($) at the beginning of a field.

Mandatory

Requires mandatory data entry in the field.

Show date picker

Specifies whether the element should be displayed Select date.

Note: If you use an input mask for a date and time field, the element Select date is not available regardless of the value of this property.

Smart tags

Adds a smart tag to the field. Smart tags have been deprecated since Access 2013.

Text alignment

Determines the default alignment of text in a control.

Condition on value

Allows you to enter an expression that must be true when adding or changing the value of this field. Used in combination with the Error Message property.

Error message

Allows you to enter a message to display if the value you enter does not match the expression in the Value Condition property.

Hyperlink

Purpose. Used to store hyperlinks such as an email address or a website URL.

Supported Field Properties

Property

Usage

Blank lines

Add only

    Yes. Changes are tracked. To view a history of field values, click the field right click mouse and select Column Log Display.

    No. Changes are not tracked.

Warning: Warning. If you set this property to No

Signature

The signature text that appears by default for this field on forms, reports, and queries. If this property is not specified, the field name is used. Any text string is valid.

Short captions are most effective.

Default value

Automatically sets this field to the specified value when a new record is added.

Format

Determines how a field appears in tables, forms, and related reports when displayed on screen or printed. You can define a custom format for a hyperlink field.

IME mode

Controls character conversion in East Asian versions of Windows.

IME Suggestion Mode

Controls sentence conversion in East Asian versions of Windows.

Indexed

Indicates whether the field is an index. There are three possible values.

    Yes (no overlap allowed). A unique index is created for the field.

    Yes (matches allowed). A non-unique index is created on the field.

    No. All indexes from the field are removed.

Note: Do not change this property for a field that is used as a primary key.

Using property Indexed It is possible to create an index on a single field, but this is not possible for all index types. For example, you cannot use this property to create an index on multiple fields.

Mandatory

Requires mandatory data entry in the field.

Smart tags

Adds a smart tag to the field. Smart tags have been deprecated since Access 2013.

Text alignment

Determines the default alignment of text in a control.

Unicode Compression

Condition on value

Allows you to enter an expression that must be true when adding or changing the value of this field. Used in combination with the Error Message property.

Error message

Allows you to enter a message to display if the value you enter does not match the expression in the Value Condition property.

MEMO

Purpose. Used to store a block of formatted text longer than 255 characters. Please note that as of Access 2013, the MEMO data type has been renamed to Long text.

Supported Field Properties

Property

Usage

Blank lines

When set to Yes, allows the entry of an empty string ("") in a text box, hyperlink field, or MEMO field.

Add only

Indicates whether field value changes should be monitored. There are two possible values:

    Yes. Changes are tracked. To view a history of field values, right-click the field and select the item Column Log Display.

    No. Changes are not tracked.

    Warning: If you set this property to No, the existing field history is deleted.

Signature

The signature text that appears by default for this field on forms, reports, and queries. If this property is not specified, the field name is used. Any text string is valid.

Advice: Short captions are most effective.

Default value

Automatically sets this field to the specified value when a new record is added.

Format

Determines how a field appears in tables, forms, and related reports when displayed on screen or printed. You can define a custom format for the MEMO field.

IME mode

Controls character conversion in East Asian versions of Windows.

IME Suggestion Mode

Controls sentence conversion in East Asian versions of Windows.

Indexed

Indicates whether the field is an index. There are three possible values.

    Yes (no overlap allowed). A unique index is created for the field.

    Yes (matches allowed). A non-unique index is created on the field.

    No. All indexes from the field are removed.

Note: Do not change this property for a field that is used as a primary key.

Using property Indexed It is possible to create an index on a single field, but this is not possible for all index types. For example, you cannot use this property to create an index on multiple fields.

Mandatory

Requires mandatory data entry in the field.

Smart tags

Adds a smart tag to the field. Smart tags have been deprecated since Access 2013.

Text alignment

Determines the default alignment of text in a control.

Unicode Compression

Compresses the text stored in this field (if less than 4096 characters are stored).

Condition on value

Allows you to enter an expression that must be true when adding or changing the value of this field. Used in combination with the Error Message property.

Error message

Allows you to enter a message to display if the value you enter does not match the expression in the Value Condition property.

Numerical

Purpose. Used to store a numeric value that is not monetary. If field values ​​can be used in calculations, choose a numeric data type.

Supported Field Properties

Property

Usage

Signature

The signature text that appears by default for this field on forms, reports, and queries. If this property is not specified, the field name is used. Any text string is valid.

Short captions are most effective.

Number of decimal places

Determines the number of decimal places to display.

Default value

Automatically sets this field to the specified value when a new record is added.

Field size

Select one of the options below.

    Byte. Used for integers from 0 to 255. Requires 1 byte for storage.

    Integer. Used for integers from –32768 to 32767. Requires 2 bytes for storage.

    Long integer. Used for integers from –2,147,483,648 to 2,147,483,647. Requires 4 bytes for storage.

    Advice: Use margin size Long integer when you create a foreign key to associate a field with a primary key field of another table that has a Counter data type.

    Single floating point. Used for floating point numbers from –3.4 x 1038 to 3.4 x 1038, which have up to seven significant digits. Storage requires 4 bytes.

    Double floating point. Used for floating point numbers from –1.797 x 10308 to 1.797 x 10308, which have up to fifteen significant digits. Storage requires 8 bytes.

    Replication code. Used to store a globally unique identifier required for replication. Storage requires 16 bytes. Please note that replication is not supported for ACCDB format files.

    Valid. Used for numbers from –9.999... x 1027 to 9.999... x 1027. Requires 12 bytes for storage.

Advice: field size.

Format

Determines how a field appears in tables, forms, and related reports when displayed on screen or printed. Any valid number format can be used.

Indexed

Indicates whether the field is an index. There are three possible values.

    Yes (no overlap allowed). A unique index is created for the field.

    Yes (matches allowed). A non-unique index is created on the field.

    No. All indexes from the field are removed.

Note: Do not change this property for a field that is used as a primary key.

Using property Indexed It is possible to create an index on a single field, but this is not possible for all index types. For example, you cannot use this property to create an index on multiple fields.

Input mask

Allows you to display special characters to control data entry. For example, an input mask might display a dollar sign ($) at the beginning of a field.

Mandatory

Requires mandatory data entry in the field.

Smart tags

Adds a smart tag to the field. Smart tags have been deprecated since Access 2013.

Text alignment

Determines the default alignment of text in a control.

Condition on value

Allows you to enter an expression that must be true when adding or changing the value of this field. Used in combination with the Error Message property.

Error message

Allows you to enter a message to display if the value you enter does not match the expression in the Value Condition property.

Big number

Purpose. Used to store a large numeric value that is not monetary. If field values ​​can be used in calculations, select the Large Number data type.

Supported Field Properties

Property

Usage

Signature

The signature text that appears by default for this field on forms, reports, and queries. If this property is not specified, the field name is used. Any text string is valid.

Short captions are most effective.

Number of decimal places

Determines the number of decimal places to display.

Default value

Automatically sets this field to the specified value when a new record is added.

Format

Determines how a field appears in tables, forms, and related reports when displayed on screen or printed. Any valid number format can be used.

Indexed

Indicates whether the field is an index. There are three possible values.

    Yes (no overlap allowed). A unique index is created for the field.

    Yes (matches allowed). A non-unique index is created on the field.

    No. All indexes from the field are removed.

Note: Do not change this property for a field that is used as a primary key.

Using property Indexed It is possible to create an index on a single field, but this is not possible for all index types. For example, you cannot use this property to create an index on multiple fields.

Input mask

Allows you to display special characters to control data entry. For example, an input mask might display a dollar sign ($) at the beginning of a field.

Mandatory

Requires mandatory data entry in the field.

Smart tags

Adds a smart tag to the field. Smart tags have been deprecated since Access 2013.

Text alignment

Determines the default alignment of text in a control.

Condition on value

Allows you to enter an expression that must be true when adding or changing the value of this field. Used in combination with the Error Message property.

Error message

Allows you to enter a message to display if the value you enter does not match the expression in the Value Condition property.

OLE object

Purpose. Used to attach an OLE object, such as a Microsoft Office Excel spreadsheet, to a record. If you are going to use OLE, you need the OLE Object data type.

In most cases, you should use an attachment field instead of an OLE object field. OLE fields support fewer file types than attachment fields. Additionally, OLE object fields do not allow multiple files to be attached to a single record.

Supported Field Properties

Text

Purpose. Used to store text up to 255 characters long. Please note that as of Access 2013, the text data type has been renamed to Short text.

Supported Field Properties

Property

Usage

Blank lines

When set to Yes, allows the entry of an empty string ("") in a text box, hyperlink field, or MEMO field.

Signature

The signature text that appears by default for this field on forms, reports, and queries. If this property is not specified, the field name is used. Any text string is valid.

Short captions are most effective.

Default value

Automatically sets this field to the specified value when a new record is added.

Field size

Enter a value between 1 and 255. Text fields can contain values ​​between 1 and 255 characters. For larger text fields, use the MEMO data type.

Advice: To improve performance, always specify the minimum required Field size.

For example, when storing postal codes fixed length, you should specify it in the property Field size.

Format

Determines how a field appears in tables, forms, and related reports when displayed on screen or printed. You can define a custom format for a text field.

IME mode

Controls character conversion in East Asian versions of Windows.

IME Suggestion Mode

Controls sentence conversion in East Asian versions of Windows.

Indexed

Indicates whether the field is an index. There are three possible values.

    Yes (no overlap allowed). A unique index is created for the field.

    Yes (matches allowed). A non-unique index is created on the field.

    No. All indexes from the field are removed.

Note: Do not change this property for a field that is used as a primary key.

Using property Indexed It is possible to create an index on a single field, but this is not possible for all index types. For example, you cannot use this property to create an index on multiple fields.

Mandatory

Requires mandatory data entry in the field.

Smart tags

Adds a smart tag to the field. Smart tags have been deprecated since Access 2013.

Text alignment

Determines the default alignment of text in a control.

Unicode Compression

Compresses the text stored in this field (if less than 4096 characters are stored).

Condition on value

Allows you to enter an expression that must be true when adding or changing the value of this field. Used in combination with the Error Message property.

Error message

Allows you to enter a message to display if the value you enter does not match the expression in the Value Condition property.

Logical

Purpose. Used to store boolean values.

Supported Field Properties

Property

Usage

Signature

The signature text that appears by default for this field on forms, reports, and queries. If this property is not specified, the field name is used. Any text string is valid.

Short captions are most effective.

Default value

Automatically sets this field to the specified value when a new record is added.

Format

Determines how a field appears in tables, forms, and related reports when displayed on screen or printed. Select one of the options below.

    True/False. Displayed as True or False.

    Not really. Displayed as Yes or No.

    On Off Displayed as On or Off.

Indexed

Indicates whether the field is an index. There are three possible values.

    Yes (no overlap allowed). A unique index is created for the field.

    Yes (matches allowed). A non-unique index is created on the field.

    No. All indexes from the field are removed.

Note: Do not change this property for a field that is used as a primary key.

Using property Indexed It is possible to create an index on a single field, but this is not possible for all index types. For example, you cannot use this property to create an index on multiple fields.

Text alignment

Determines the default alignment of text in a control.

Condition on value

Allows you to enter an expression that must be true when adding or changing the value of this field. Used in combination with the Error Message property.

Error message

Allows you to enter a message to display if the value you enter does not match the expression in the Value Condition property.