Tuesday, May 3, 2011

Create a Table - V


Table Views
There are two ways to view a table in Access to add data to the table:  Design View and Datasheet View
In Design View you can view all the fields with the data types and descriptions.  The records of information that has been added to the database is not viewable. 
Table Design View
To go to Design View:
  • Click the down arrow on the View button
  • Click Design View
Views Drop Down
In Datasheet View you can display the records in a table, where one row is one record.  The column headers are the fields you have defined for the database. 
Table Datasheet View
To go to Datasheet View:
  • Click the down arrow on the View button
  • Click Datasheet View
Views Drop Down
Adding  New Fields
There are many ways to enter new fields into a database.  New fields can be added in the Datasheet View or in the Design View.
There are two ways to add a new field in Datasheet View:  Add A New Field or the New Field Button. 
To add a New Field within the Datasheet:
  • Click the Add New Field column
Add A New Field Column
To add a new field by using the New Field Button
  • Click the Datasheet tab on the Ribbon
  • Click the New Field Button
  • Choose the type of field you wish to add from the Field Templates window
Add a New Field Button
To add a new field in Design View:
  • Click the Design View button
  • Click on the next available field
  • Type in the Name of the field
Add a New Field in Design View
Data Types
There are many types a data that a field can be predefined to hold.  When you create a new field in a database you should closely match the data type to what will be entered into the field.
Text
Text, number, or a combination up to 255 characters
Memo
Similar to the text field, can contain text, numbers, or a combination up to 2 GB of data.
Number
Numbers up to 16 bytes of data
Date/Time
Date and Time information
Currency
Currency up to 8 bytes and precise to 4 decimal places
AutoNumber
Access creates a unique number for each new record.  This is often the primary key for the table
Yes/No
Yes and No, stored as -1 for yes and 0 for no
OLE Object
Images, documents, graphs up to 2 GB
Hyperlink
Web addresses
Attachment
Attachments such as images, spreadsheets, documents, and charts.

Editing Data Types in Fields
When creating tables, you should define the data types of the tables to most closely match the type of data that will be entered in the field.
To edit the Data Type in Datasheet View:
  • Click the field you wish to define
  • Click the Datasheet tab on the Ribbon
  • Click the down arrow next to Data Type
  • Choose the type of data that will be entered into the field
Data Type Drop Down
To edit the format of the data:
  • Click the field you wish to define
  • Click the Datasheet tab on the Ribbon
  • Click the down arrow next to Format
Data Format Drop Down
To edit the Data Type in the Design View:
  • Click Design View
  • Click the field name you wish to define or create a new field
  • Click the Data Type
  • Choose the appropriate Data Type
  • Format the field in the Field Properties Dialog box
Data Type Design View

No comments:

Post a Comment