Specifying Data Types and Field Properties

graphics/microsoft102_1.gif

Access provides different data types ” field formats that define the kind of data the field can accept ”which cover a wide variety of data. When you choose a data type for a field, Access will accept data entered only in the format specified by the data type. Selecting the appropriate data type makes it easier for users to enter and retrieve information in the database tables. It also acts as a check against incorrect data being entered. For example, a field formatted to accept only numbers removes the possibility that a user will erroneously enter text into the field.

Data Types

Data Type

Description

Text (default)

Text or combinations of text and numbers, as well as numbers that don't require calculations, such as phone numbers. Limited to 255 characters .

Number

Numeric data used in mathematical calculations.

Date/Time

Date and time values for the years 100 through 9999.

Currency

Currency values and numeric data used in mathematical calculations involving data with one to four decimal places. Values are accurate to 15 digits on the left side of the decimal separator.

AutoNumber

A unique sequential number (incremented by 1) or a random number Access assigns whenever you add a new record to a table. AutoNumber fields can't be changed.

Yes/No

A field containing only one of two values (for example, Yes/No, True/False, On/Off).

OLE Object

An object (such as a Microsoft Excel spreadsheet) linked to or embedded in an Access table.

Hyperlink

A link that, when clicked, takes the user to another file, a location in a file, or a site on the Web.

Lookup Wizard

A wizard that helps you to create a field whose values are chosen from the values in another table, query, or list of values.


You can change the data type for a field even after you have entered data in it. However, you might need to perform a potentially lengthy process of converting or retyping the field's data when you save the table. If the data type in a field conflicts with a new data type setting, you may lose some or all of the data in the field.

Once you've selected a data type, you can begin to work with field properties. A field property is an attribute that defines the field's appearance or behavior in the database. The number of decimal places displayed in a numeric field is an example of a property that defines the field's appearance. A property that forces the user to enter data into a field rather than leave it blank controls that field's behavior. In Design view for tables, Access provides a list of field properties, called the properties list , for each data type.



Show Me Microsoft Office Access 2003
Show Me Microsoft Office Access 2003
ISBN: 0789730049
EAN: 2147483647
Year: 2002
Pages: 318

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net