All About Fields
Field Definitions
A field definition consists of:
- a field name
- a field type
- and any field options or formulas
Field Types (aka Data Types)
- Text
|
When
is a number a number and not text? The easiest way to
tell the difference is to ask yourself if it would
make sense to add or subtract numbers within the
field. If addition/subtraction makes sense, then it is
a number; if not, then it is text. For example, adding
one to a zip code does not make sense, but
incrementing the number of student projects does. (By
the way, if zip codes were stored as numbers, how
would you handle east coast zip codes that begin with
a zero?
|
- this field is used to store alphanumeric data which can be letters, numbers,
special symbols, or
any combination of the three
- in Access, when you use a text field you also need to specify the size
of the field, that is the maximum number of characters you anticipate
will be stored for any given field
- the maximum size of a text field is 255 characters
- Memo
- again, a field to store alphanumeric data
- it is used for whenever general notes or detailed descriptions are
needed that will exceed the 255 character limit of a Text field
- the maximum size for a memo field is 64,000 characters (a really
large text field!)
- Number
- this field is used for numeric data
- as noted in the sidebar, use this field when you might need to
perform mathematical operations
- Date/Time
- this field is used to store calendar data
- used for date and/or time data together or separately
- Currency
- this is a special number field used to track monetary data
- however, you can set this field to store percentages or numbers
written in scientific notation (so why is it called Currency?)
- AutoNumber
- this field is used to store automatically generated numeric
information
- the default starting value is 1, the default increment value is also
1; you can of course change either or both of these default values
- for example, you could use this field to automatically generate a
customer number or a student id number each time a new record is
created
- Yes/No
- whenever you need to store the answer to a mutually exclusive
question, you can use this field
- depending upon the format, this field will store Yes/NO,
True/False, or On/Off
- OLE Object
- acronym for Object Linking and Embedding
- allows you to include non-Access objects like picture, video, and
sound files in Access tables
- a very powerful but not often used by the faint of heart tool!
- Hyperlink
- field type used to store the special hypertext links
- the links can be to Web sites, files on a server, files on your
computer, or other database objects
- Lookup Wizard
- a very powerful feature!
- permits you to create a field that contains a preset list of values
- the form of the field may be text boxes, list boxes, and combo boxes
- users select a value from the preset list of values you create
or
in the case of list and combo boxes, they can also enter their own
value(s)
- this minimizes error in data entry, makes the data stored in a field
consistent with what you want
Tips
Text and memo fields can also store hyperlinks as well. Hyperlink fields
are simple live links that when clicked will take the user to the object
referenced by the link.
Access makes sure that the user enters the correct data type into a field.
For example, if the user enters text into a number field, an alert will warn
that the incorrect data type was entered.
Copyright © 2003
last updated
August 13, 2003