Microsoft Office Tutorials and References
In Depth Information
Setting Field Sizes
Figure 2-4
Common data types
Data Type
Description
Field Size
Text
Allows field values containing letters, digits, spaces, and special
characters. Use for names, addresses, descriptions, and fields containing digits
that are not used in calculations.
0 to 255 characters; default
is 255
Memo
Allows field values containing letters, digits, spaces, and special
characters. Use for long comments and explanations.
1 to 65,535 characters; exact
size is determined by entry
Number
Allows positive and negative numbers as field values. Numbers can
contain digits, a decimal point, commas, a plus sign, and a minus sign. Use
for fields that will be used in calculations, except those involving money.
1 to 15 digits
Date/Time
Allows field values containing valid dates and times from January 1, 100
to December 31, 9999. Dates can be entered in month/day/year format,
several other date formats, or a variety of time formats, such as 10:35 PM.
You can perform calculations on dates and times, and you can sort them.
For example, you can determine the number of days between two dates.
8 bytes
Currency
Allows field values similar to those for the Number data type, but is used
for storing monetary values. Unlike calculations with Number data type
decimal values, calculations performed with the Currency data type are
not subject to round-off error.
Accurate to 15 digits on the
left side of the decimal point
and to 4 digits on the right side
AutoNumber
Consists of integer values created automatically by Access each time you
create a new record. You can specify sequential numbering or random
numbering, which guarantees a unique field value, so that such a field
can serve as a table’s primary key.
9 digits
Yes/No
Limits field values to yes and no, on and off, or true and false. Use for
fields that indicate the presence or absence of a condition, such as
whether an order has been filled or whether an invoice has been paid.
1 character
Hyperlink
Consists of text used as a hyperlink address, which can have up to four
parts: the text that appears in a field or control; the path to a file or page;
a location within the file or page; and text displayed as a ScreenTip.
Up to 65,535 characters
total for the four parts of the
Hyperlink data type
Setting Field Sizes
The Field Size property defi nes a fi eld value’s maximum storage size for Text, Number,
and AutoNumber fi elds only. The other data types have no Field Size property because
their storage size is either a fi xed, predetermined amount or is determined automatically
by the fi eld value itself, as shown in Figure 2-4. A Text fi eld has a default fi eld size of
255 characters; you can also set its fi eld size by entering a number from 0 to 255. For
example, the FirstName and LastName fi elds in the Customer table will be Text fi elds
with a size of 20 characters and 25 characters, respectively. These fi eld sizes will
accommodate the values that will be entered in each of these fi elds.
 
Search JabSto ::




Custom Search