Microsoft Access 2010 Bible

(Rick Simeone) #1

Part I: Access Building Blocks


58


l (^) Text to Number, Currency, Date/Time, or Yes/No: In most cases, the conversion
will be made without damaging the data. Inappropriate values are automatically deleted.
For instance, a Text field containing “January 28, 2012” will be faithfully converted to a
Date/Time field. If, however, you change a field containing “January 28, 2012” to a
Yes/No data type, its value will be deleted.
l Memo to Text: A straightforward conversion with no loss or corruption of data. Any text
longer than the field size specified for the Text field is truncated and lost.
l Number to Text: No loss of information. The number value is converted to text using
the General Number format.
l Number to Currency: Because the Currency data type uses a fixed decimal point,
some precision may be lost as the number is truncated.
l Date/Time to Text: No loss of information. Date and time data are converted to text
with the General Date format.
l Currency to Text: No loss of information. The currency value is converted to text with-
out the currency symbol.
l Currency to Number: Simple, straightforward conversion. Some data may be lost as the
currency value is converted to fit the new number field. For example, when converting
Currency to Long Integer, the decimal portion is truncated (cut off).
l (^) AutoNumber to Text: Conversion occurs without loss of data, except in a case where
the width of the text field is inadequate to hold the entire AutoNumber value. In this
case, the number is truncated.
l AutoNumber to Number: Simple, straightforward conversion. Some data may be lost as
the AutoNumber value is converted to fit the new number field. For example, an
AutoNumber larger than 32,767 will be truncated if it is converted to an Integer field.
l (^) Yes/No to Text: Simple conversion of Yes/No value to text. No loss of information.
Note
The OLE Object data type can’t be converted to any other type of data.
Assigning field properties
The field properties built into Access tables are powerful allies that can help you manage the data
in your tables. In most cases, the field property is enforced by the database engine, which means
the property is consistently applied wherever the field’s value is used. For example, if you’ve set the
Default Value property in the table design, the default value is available in the table’s Datasheet
view, on forms, and in queries.
In fact, field properties are among the many differences between Access tables and Excel work-
sheets. Understanding field properties is just one of several skills necessary to begin using Access
tables to store data, rather than Excel worksheets.

Free download pdf