Saturday, November 17, 2012

MS Access Lesson 2


Lesson 2: Creating Microsoft Access Tables

Tables are the foundation of an Access database. Access stores data in tables. This lesson teaches you how to create a table, add fields to a table, assign data types to fields, and set field properties.

Understanding Tables

A table is a set of columns and rows. Each column is called a field. Within a table, each field must be given a name and no two fields can have the same name. Each value in a field represents a single category of data. For example, a table might have three fields: Last Name, First Name, and Phone Number. The table consists of three columns: one for last name, one for first name, and one for phone number. In every row of the table, the Last Name field contains the last name, the First Name field contains the first name, and the Phone Number field contains the phone number. Each row in a table is called a record.
Table
All of the data in a table should refer to the same subject. For example, all of the data in the Employees table should refer to employees, all of the data in the Students table should refer to students, and all of the data in the Courses table should refer to courses.
You can view an Access database as a collection of related tables. For example, in a database that contains tables for Employees, Students, and Courses, the Employees table lists the employees, the Students table lists students, and the Courses table lists the courses students can take.
After Access creates a blank database, it opens in Datasheet view and makes available the tools you need to create a table. Datasheet view displays a table as a set of columns and rows. When you view a blank database for the first time in Datasheet view, you see a column named ID. This column is by default the primary key field.
primary key is a field or combination of fields that uniquely identify each record in a table. No two records in a table should have the same values in every field. For example, the following should not occur in a table.
Last NameFirst NameCity
SmithJohnJonestown
SmithJohnJonestown
In the real world, it is possible to have two people from the same city with the same first and last name. In cases like this, you can use the ID field as the primary key field and use it to make each record unique. The ID field has a data type of AutoNumber; as a result, Access automatically creates a unique number for each record in the database. The resulting table will look like the one shown here.
IDLast NameFirst NameCity
1SmithJohnJonestown
2SmithJohnJonestown
Access provides several methods for creating a table. One method is to use the Rename option with the Add New Field column label to give each column the field name you want it to have and then to type or paste your data into the table. Field names can include letters, numbers, and spaces and can be up to 64 characters long. When choosing a field name, try to keep it short.
When you save your table for the first time, Access gives you the opportunity to name your table. Each table name must be unique; hence, two tables in the same database cannot have the same name. The table name should describe the data in the table; can consist of letters, numbers, and spaces; and can be up to 64 characters long. When choosing a table name, try to keep it short.
You can save a table by clicking the Save button on the Quick Access toolbar or by right-clicking the Tables tab and then choosing Save from the menu that appears.

To add fields to a table:

Rename Field
  1. Click the Add New Field column label.
  2. Activate the Datasheet tab.
  3. Click Rename in the Fields & Columns group.
  4. Type the field name.
  5. Press Enter. Access creates the field.
  6. Type the next field name. Access creates the field. Continue until you have created all of the fields in your table.
  7. Press Enter without entering a field name to end your entries.
Or
  1. Right-click the Add New Field column label. A menu appears.
  2. Click Rename Column.
  3. Type the field name.
  4. Press Enter. Access creates the field.
  5. Type the next field name. Access creates the field. Continue until you have created all of the fields in your table.

Name and Save a Table

After you create a table, you must name and save it.

To name and save a table:

Name and Save Table
  1. Click the Save button on the Quick Access toolbar. The Save As dialog box appears.
  2. Type the name you want to give your table.
  3. Click OK. Access names your table.
Tip Tip: You can use the Rename option at any time to rename any column. For example, you can rename the ID column Employee ID.

Understanding Data Types

In Access, you use data types to specify the type of data each field can capture. A field with a data type of text can store alphabetic characters and numbers. Generally speaking, you cannot perform mathematical calculations by using a text field. For example, you can use a text field to store a street address. Unless you do some manipulation, you cannot use the numbers in the street address in mathematical calculations. You will not be able to sum or average the numbers in an address field, which is fine, because you probably do not want to. Alternatively, you can assign a Test Score field a data type of Number. You can enter numbers into the field and then average, sum, or perform other calculations with the numbers. However, you cannot enter an alphabetic character in a number field.

Data Types
Data TypeUseNotes
TextAlphanumeric data. Use for text and for numbers that are not used in mathematical calculations. Use for names, addresses, and other relatively short pieces of text. Can store up to 255 characters..
MemoLong text. Use for long pieces of text, such as notes and long descriptions. Can store up to 64,000 characters.
NumberNumeric data. Use for numbers you want to use in mathematical calculations.If you are working with currency, use the currency type.
Date/TimeUse for dates and times.
CurrencyUse for currency.Prevents rounding during calculation.
AutoNumberUnique sequential numbers or random numbers automatically inserted when you create a record. Use to create a primary key.
Yes/NoLogical data. Use when only one of two values is valid. Yes/No, True/False, etc.
HyperlinkUse to store hyperlinks.
AttachmentUse to store attachments.
OLE ObjectUse to attach an OLE object such as a Word document, Excel spreadsheet, or PowerPoint presentation.
After you create the fields for a table, you can enter data by typing in each field. As you type, Access assigns a data type to each field based on your entry.

Assigned Data Types
Sample EntryData Type Assigned
SmithText
http://www.website.comHyperlink
10000Number, Long Integer
10,000Number, Long Integer
10,000.99Number, Double
10000.999Number, Double
01/01/2009
The date and time formats recognized are those of your user locale.
Date/Time
January 1, 2009Date/Time
12:10:33Date/Time
12:30 amDate/Time
16:50Date/Time
100.50Number, Double
25.00%Number, Double
1.23E+02Number, Double

Explicitly Assign Data Types and Formats

You may want to change the data type Access assigned to a field, or you may want to explicitly assign a data type to each field. You can do so by choosing the Datasheet tab and then selecting the proper option in the Data Type field in the Data Type & Formatting group.
Some data types allow you to select the formatting you want. By formatting, you determine how data in a field displays. For example, if you choose a data type of number and a format of Euro, any number you enter will appear with a Euro sign in front.
Windows regional settings enable you to display information such as dates, times, and currency that match the standards or language used in the country in which you live. For example, if you live in the United States, the currency setting uses a dollar sign.
Regional Settings for English (United States)
Number123,456,789.00
Currency$123,456,789.00
Time3:39:44 PM
Short Date7/28/2008
Long DateMonday, July 28, 2008
Use the Windows Control panel’s Regional and Language options to view or change regional settings.

Data Types
Data TypeFormatHow Numbers Display
NumberGeneral NumberAs typed.
CurrencyUses thousands separator. Follows regional settings.
EuroUses currency format with Euro symbol.
FixedDisplays at least one digit. Follows regional settings.
StandardUses thousands separator. Follows regional setting.
PercentConverts entry to percent.
ScientificUses scientific notation.
CurrencyGeneral NumberAs typed.
CurrencyUses thousands separator. Follows regional settings.
EuroUses currency format with Euro symbol.
FixedDisplays at least one digit. Follows regional settings.
StandardUses thousands separator. Follows regional setting.
PercentConverts entry to percent.
ScientificUses scientific notation.
Date/TimeGeneral DateDate values display as numbers and time values as hours, minutes, and seconds followed by AM or PM. Follows regional settings.
Long DateUses the Long Date format specified in your Windows regional settings.
Medium DateUses dd/mmm/yy, using the date separator specified in your Windows regional settings.
Short DateUses the Short Date format specified in your Windows regional settings.
Long TimeUses hours, minutes, and seconds followed by AM or PM. Uses the separator specified in the Time setting in your Windows regional settings.
Medium TimeDisplays hours and minutes followed by AM or PM. Uses the separator specified in the Time setting in your Windows regional settings.
Short TimeUses hours and minutes. Uses the separator specified in the Time setting in your Windows regional settings.
Yes/NoYes/No
True/False
On/Off

To explicitly assign a data type or format to a field:

Assign DataType
  1. Click the field label for the field to which you want to assign a data type.
  2. Activate the Datasheet tab.
  3. Click the down-arrow next to the Data Type field and then choose a data type.
  4. Click the down-arrow next to the Format field and then choose a format. Access assigns a data type and format to the field you selected.
 Tip Tip: If you want every record in a field to be unique, check the Unique box on the Datasheet tab in the Data Type & Formatting group. If you do not want the user to leave a field blank, check the Is Required box.
Tip Tip: In the Data Type & Formatting group, there are several formatting options you can apply to numbers. If you want to use the Currency format, click the Currency button Currency Button; if you want to use the Percent format, click the Percent button Percent Button; if you want to use a Comma number format, click the Comma button Comma Button; or if you want to increase or decrease the number of decimal place, click the Increase Decimal  Increase Decimal Button or Decrease Decimal  button Decrease Decimal Button.
 Tip Tip: You can create a new table at any time by activating the Create tab and then clicking Table.

Understanding Design View

Access provides several ways to view the objects in your database. You can use Design view to create or modify an Access table. You can use the View button on the Home tab or the Table Design button on the Create tab to change to Design view. Using Design view is the preferred method for creating a table because it provides you with the most options and enables you to precisely define your table. In addition to selecting a data type, you can set all of the following options in Design view.

Design View Options
Field PropertyData TypeComments
Field SizeTextEnables you to restrict the number of characters stored in a text field to 0 to 255 characters. The default is 255.
NumberEnables you to select the type of number stored in a field.
Number TypesValues Stored
Byte0 to 255. (No fractions)
Decimal–9.999... x 1027 through +9.999... x 1027
Integer–32,768 to +32,767 (No fractions)
Long Integer–2,147,483,648 to +2,147,483,647
Single–3.4 x 1038 to +3.4 x 1038 numeric floating point values. Up to seven significant digits.
Double–1.797 x 10308 to +1.797 x 10308 1038 numeric floating point values. Up to fifteen significant digits.
Replication IDGlobally Unique Identifier (GUID). Used by Access to establish a unique identifier for replication.
FormatNumberDetermines how numbers display. When you use the currency, fixed, standard, and percent formats. Access follows the settings specified in Regional Settings in the Windows Control Panel for negative amounts, decimal and currency symbols, and decimal places.
Currency NumberGeneral NumberDisplays as typed.
CurrencyUses thousands separator. Follows regional setting.
EuroUses currency format with Euro symbol.
FixedDisplays one digit. Follows regional settings.
StandardUses thousands separator. Follows regional settings.
PercentConverts entry to percent.
ScientificUses scientific notation.
Date/TimeGeneral DateDisplays date and time.
Example: 01/02/99, 06:28:21 PM
Long DateDisplays Day of Week and Date:
Example: Saturday, January 02, 1999
Medium DateExample: 02-Jan-99
Short DateExample: 01/02/99
Long TimeExample: 6:28:21 PM
Medium TimeExample: 6:28 PM
Short TimeExample: 18:28
Text and Memo@Text character required.
&Text character not required.
Changes all characters to lowercase.
Changes all characters to uppercase.
Yes/NoYes/NoIf the Lookup Display Control is a text box, displays Yes/No.
True/FalseIf the Lookup Display Control is a text box, displays True/False.
On/OffIf the Lookup Display Control is a text box, displays On/Off.
Decimal PlacesDetermines number of decimal places Access displays.Auto. Number of decimals displayed depends on the format setting.
0–15. Used with format property. Determines the number of digits that display to the right of the decimal point.
Input MaskSpecial characters used to control the values the user can input.
CaptionField name displayed on forms.
Default ValueSets the value that appears in the field by default when a record is created.
Validation RuleSets the requirements for user input.
Validation TextText for error messages that are sent when validation rules are broken.
RequiredSpecifies whether the field is required or not.Yes: Required
No: Not Required
Allow Zero LengthDetermines whether a zero-length field is a valid entry.Yes: Is valid
No: Not valid
IndexSpecifies whether an index should be created in a field. Indexes speed up queries.Yes: Create index.
No: Do not create index.

To use Design view to create a new table:

Create Table
  1. Activate the Create tab.
  2. Click Table Design in the Tables group. Access changes to Design view and the Table Tools become available.
Create Table
  1. Type the first field name in the Field Name field.
  2. Press the Tab key.
  3. Click the down-arrow that appears when you click in the Data Type field and then select a data type.
  4. Click Primary Key if the column you created is a primary key. A small key appears next to the field name.
  5. Press the Tab key.
  6. Type a description. The description is optional.
  7. Press the Tab key. Access moves to the Field Name field.
  8. Repeat steps 3 through 10 until you have created all of your fields.

To set field properties:

Set Field Properties
Set Field Properties
  1. Click the field for which you want to set the field properties.
  2. Activate the General tab in the Field Properties area.
  3. Set the properties you want to set.
  4. Repeat steps 1 through 3 until you have set all the properties for all fields.
You can use Design view to create or modify a table. After you finish the task, you must save the table by clicking the Save button on the Quick Access toolbar.
  1. Click the Save button on the Quick Access toolbar. Access saves the table unless you are saving for the first time. If you are saving for the first time, the Save As dialog box appears.
  2. Type the name you want to give your table.
  3. Click OK. Access saves the table. You can now access the table by using the Navigation pane.
Question What are views?
Views are different ways of looking at the same object. Tables have four views: Datasheet view, Pivot Table view, Pivot Chart view, and Design view. You use Datasheet view to create a table, edit data, or view data; Pivot Table view to create a pivot table; Pivot Chart view to create a pivot chart; and Design view to create a table or modify an existing table.

To change the view:

  1. Activate the Home tab.
  2. Click the down-arrow under the View button. A menu appears.
  3. Click the view you want. Access changes to the view you chose.
Tip Tip: You can also use a template to create a table. Access has several templates from which you can choose. When using a template, you create the table and then modify it to suit your needs.
  1. Activate the Create tab.
  2. Click the Table Templates button in the Tables group. A menu appears.
  3. Click the template you want to use. Access creates a table based on the template.

Create a Lookup Column

If a field can contain a finite list of values, you can create a Lookup Column and users can select the value they want from a list. For example, if the employees at a school can only work in one of the following departments: Administration, Computer Science, English, History, or Math. You can create a table Departments table that lists the departments and then use the list in the Employee table to assign each employee to a department.

Departments
Department IDDepartment
Primary Key
1Administration
2Computer Science
3English
4History
5Math
Access has a wizard to help you create lookup columns. Creating a Lookup column creates a relationship between two tables. See the section Create Relationships in Lesson 3 to learn more about relationships.

To use the Lookup Wizard to create a lookup column:

Open the Lookup Wizard

Open Lookup Wizard
Open Lookup Wizard
  1. Open the table to which you want to add a lookup column.
  2. Click the field label for the field before which you want to add a lookup column.
  3. Activate the Datasheet tab. (You must be in Datasheet view.)
  4. Click the Lookup Column button in the Fields & Columns group. The Lookup Wizard appears.
  5. Make sure the radio button next to “I want the lookup column to look up the values in a table or query.” is selected.
  6. Click Next. The Lookup Wizard moves to the next page.

Select your table or query

A lookup column can be based on a table, a query, or a list of values you type. If you base your lookup column on a table or query, you must create the table or query before creating the lookup column. A query is a list of rows and columns based on one or more tables. A query only displays the rows and columns you specify.
Select Table
  1. Click a radio button to select what you want to base your lookup column on. Choose from Tables, Queries, or Both.
  2. Click to select the table or query you want.
  3. Click Next. The Lookup Wizard moves to the next page.

Select fields

You choose the fields you want to appear in your lookup column. Be sure to include the primary key.
Select Fields
  1. Click the field you want.
  2. Click the single right-arrow button . Access places the field in the Selected Fields column. Repeat this process to select additional fields. If you want all the fields in the table, click the double right-arrow button . Note: Use the single left-arrow  and the double left-arrows  to deselect fields.
  3. Click Next. The Lookup Wizard moves to the next page.

Sort fields

The Lookup Wizard allows you to sort the records in a lookup column. You can display records in order, either ascending (alphabetical from A to Z, lowest number to highest number, earliest date to latest date) or descending (alphabetical from Z to A, highest number to lowest number, latest date to earliest date). You can also sort within a sort. For example, you can sort by state and then within each state by city, and then within each city by street address. If you are creating a sort within a sort, create the highest level sort on line one, the next level sort on line two, and so on. In the state, city, and street address example, you create the state on line one, the city on line two, and the street address on line three.
Sort Field
  1. Click the down-arrow and then select the field you want to sort by.
  2. Click to select a sort direction (the button toggles between ascending and descending). You can sort within a sort for up to four levels.
  3. Click Next. The Lookup Wizard moves to the next page.

Adjust column widths

A key column is the column that connects one table or query to another table or query. For example, you can use the Department ID field in the Employees table and the Department ID field in the Departments table to connect the two tables. You may, however, want to display the name of the department when you view the table but not the department ID; if so, leave the Hide Key Column box checked.
Adjust Column Widths
  1. Deselect Hide Key Column, if you wish.
  2. Adjust the column widths by dragging or double-clicking the right vertical border for the column.
  3. Click Next. The Lookup Wizard moves to the next page.

Specify the Key Field (if you deselected Hide Key Column)

A key field is a field that uniquely identifies a record. If you deselected Hide Key column, you must tell Access which field is the key field.
Specify the Key Field
  1. Click the key field.
  2. Click Next. The Lookup Wizard moves to the next page.

Name the column

Field names appear at the top of each column. On this page of the Wizard you tell Access what you want to name your lookup column. In Access 2007, multiple values can appear in a field; click the Allow Multiple Values checkbox if you want to allow multiple values.
Name the Column
  1. Type the name you want to give the column.
  2. Click if you want to allow multiple values in the field.
  3. Click Finish. Access creates the lookup column.
Question How do I create a lookup column by typing a list?
  1. Activate the Datasheet tab. (These instructions assume you are in the Datasheet view.)
  2. Click the Lookup Column button in the Fields & Columns group. The Lookup Wizard appears.
  3. Click the radio button next to “I will type the values I want.”
  4. Click Next. The Lookup Wizard moves to the next page.
  5. Type the number of Columns you want in the Number Of Columns field.
  6. Type the values you want under the column heading.
  7. Click Next. The Lookup Wizard moves to the next page.
  8. Type the column label you want.
  9. Click Finish. Access creates a lookup column based on your list.

MS Access Lesson 1



Lesson 1: Getting Familiar with Microsoft Access 2007 for Windows

Microsoft Access is a database software package. Adatabase is an organized collection of records. Telephone and address books are examples of paper databases. With Access, you can create a computerized database. For example, you can use Access to organize the students who attend a school, the courses they take, and the instructors who teach them. After you create an Access database, you can search it, manipulate it, and extract information from it. This lesson introduces you to Access windows and teaches you how to create a database.

Getting Started

You use windows to interact with Access. To begin, start Access 2007. You screen will look similar to the one shown here.
Access Window
Northwind is a sample database you can download from the Microsoft website. I will use the Northwind database to introduce you to Access windows. If the Northwind database is already on your system, open it, otherwise download it and then open it.

To open Northwind:

  1. Click the Microsoft Office button. A menu appears.
  2. Click Open. The Open dialog box appears.
  3. Locate the Northwind database.
  4. Click the Open button. Access opens the Northwind database.

To download Northwind, connect to the Internet and then follow these steps:

Download Northwind
  1. Click Sample. The Northwind 2007 icon appears in the center of the window.
  2. Click the Northwind icon.
  3. Click the Browse button. The File New Database window appears.
  4. Locate the folder in which you want to save the Northwind database.
  5. Click OK. The File New Database window closes.
  6. Click Create. Access creates the Northwind database and opens it.

Understanding Security

It is possible for an Access database to contain malicious code, such as a computer virus. Access has security settings that disable code and display a security warning when you open a database. If you know a database is trustworthy, you can perform the following steps to enable it. You may need to enable the Northwind database.

To enable a database:

EnableDatabase
  1. Click the Options button. The Microsoft Office Security Options dialog box appears.
  2. Click Enable This Content.
  3. Click OK. Access enables the content. If you are enabling the Northwind database, the Login dialog box appears.
Login Dialog Box
  1. Click Login. Access opens the Northwind database.
If you know a database is safe, you can store it in a trusted location. Databases stored in trusted locations do not require you to enable security.

To create a trusted location:

  1. Click the Microsoft Office button. A menu appears.
  2. Click Access Options in the bottom-right corner. The Access Options pane appears.
  3. Click Trust Center.
  4. Click Trust Center Settings.
  5. Click Trusted Locations.
  6. Click Add New Locations. The Microsoft Office Trusted Location dialog box appears.
  7. Enter the path to the location you want to trust, or click Browse to locate the folder.
  8. If you want to trust subfolders, select The Subfolders Of This Location Are Also Trusted.
  9. Click OK. The location is now a trusted location.
  10. Click OK again.
  11. Click OK. You have created a trusted location.

The Navigation Pane

The Access window used in this example has been set up to make it easier to explain. This section shows you how to set up your window so that it matches the example. If you are not already logged in to Northwind, click the Login button.
An Access database consists of the following objects: tables, queries, forms, reports, macros, and modules. The Navigation pane displays the objects in a database.

To manipulate the Navigation pane:

Manipulate Navigation Pane
  • Click the double right-arrows Double Left Arrows to open it. The arrows change to double left-arrows Double Left Arrows.
  • Click the double left-arrows Double Left Arrows to close it. The arrows change to double right-arrows Double Right Arrows.
In this example, the objects are organized by type, which is not the default setting. You may want to organize the objects in your database by type also. You can use the down-arrow on the top of the Navigation pane to change the manner in which objects are organized.

To organize objects by type:

  1. Click the All Access Objects button on the Navigation pane. A menu appears.
  2. Click Object Type. Access displays the objects in the database by type.
The Access window with the Northwind database open is shown here.
Northwind
Note Note: Your window probably does not look exactly like the one shown. In Access 2007, the window display depends on the size of the window, the size of your monitor, and the resolution to which your monitor is set. Resolution determines how much information your computer monitor can display. If you use a low resolution, you can fit less information on your screen, but the size of your text and images are larger. If you use a high resolution, you can fit more information on your screen, but the size of the text and images are smaller. Also, you can use settings in Access 2007, Windows Vista, and Windows XP to change the color and style of your windows.

The Microsoft Office Button

Office Button
In the upper-left corner of the Access window is the Microsoft Office button. When you click the button, a menu appears. You can use the menu to create a new file, open an existing file, save a file, and perform many other tasks.

The Quick Access Toolbar

Quick Access Toolbar
Next to the Microsoft Office button is the Quick Access toolbar. The Quick Access toolbar provides you with access to commands you frequently use. By default, Save, Undo, and Redo appear on the Quick Access toolbar. You use Save to save an object, Undo to roll back an action you have taken, and Redo to reapply an action you have rolled back.

The Title Bar

Title Bar
The Title bar is located at the top in the center of the Access window. The Title bar displays the name of the database on which you are currently working.

The Ribbon

Ribbon
You use commands to tell Access what to do. In Access 2007, you use the Ribbon to issue commands. The Ribbon is located near the top of the Access window, below the Quick Access toolbar. At the top of the Ribbon are several tabs; clicking a tab displays related command groups. Within each group are related command buttons. You click buttons to issue commands or to access menus and dialog boxes. You may also find a dialog box launcher Launcher in the bottom-right corner of a group. When you click the dialog box launcher Launcher, a dialog box makes additional commands available.

Access Objects

To view or hide the objects on the Navigation pane:

Object on Navigation Pane
  • You click the double down-arrows Double Down Arrows to view objects. The double down-arrows change to double up-arrows Double Up Arrows.
  • You click the double up-arrows Double Up Arrows to hide objects. The double up-arrows change to double down-arrows Double Down Arrows.
As stated earlier, the Navigation pane stores the objects in your database: tables, queries, forms, reports, macros, and modules. Objects always display with an icon to the right. The icon tells you the object type: Table Icon table, Query Iconquery, Form Icon form, Report Iconreport, Macro Iconmacro, and Module Icon module.

Objects
TablesIn Access, data is stored in tables. A table is a set of columns and rows, with each column referred to as a field. Each value in a field represents a single type of data. Each row of a table is referred to as a record.
QueriesYou use queries to retrieve specific data from your database and to answer questions about your data. For example, you can use a query to find the names of the employees in your database who live in a particular state.
FormsForms give you the ability to choose the format and arrangement of fields. You can use a form to enter, edit, and display data.
ReportsReports organize or summarize your data so you can print it or view it onscreen. You often use reports when you want to analyze your data or present your data to others.
MacrosMacros give you the ability to automate tasks. You can use a macro to add functionality to a form, report, or control.
ModulesLike macros, modules give you the ability to automate tasks and add functionality to a form, report, or control. Macros are created by choosing from a list of macro actions, whereas modules are written in Visual Basic for Applications.
Objects Explained
You double-click an object to open the object. You right-click an object to view a menu of options. You can use the menu to do such things as open objects, rename objects, and delete objects.
Objects that are open appear on tabs. Right-click a tab to view a menu of options you can perform, such as save the object, close the object, or change the view.

Change Views

Change Views
A view is a way of looking at an object. For example, in Access, data is stored in tables. Two of the possible ways you can view a table are Datasheet view and Design view. You can see the data contained in a table in Datasheet view. You can see the design of a table in Design view. When you open an object, buttons appear in the lower-right corner of the Access window. You can use the View button on the Home tab to change views, or you can click the proper button in the lower-right corner of the window.

Close a Database and Exit Access

This completes the introduction to Access using the Northwind database. The following describes how you close a database and exit Access.

To close a database:

  1. Click the Microsoft Office button. A menu appears.
  2. Click Close Database. Access closes the database.

To exit Access:

  1. Click the Microsoft Office button. A menu appears.
  2. Click Exit Access. You exit Access.

Create a Database

When you start Access, the Getting Started With Microsoft Office Access screen appears. You can use this screen to create a database. Within a database, you can do such things as enter data, create reports, and retrieve data. You can create a blank database or you can use one of the templates provided by Microsoft. When you use a template, Access creates forms you can use to enter data, reports you can use to retrieve data, and more. You can modify the forms, reports, and other objects to suit your needs. This tutorial will teach you how.
The following templates are included with Access: Assets, Contacts, Events, Faculty, Issues, Marketing Projects, Projects, Sales Pipeline, Students, and Tasks. Other templates are available online. Each template creates a database related to the title. For example, the Faculty template creates a faculty database that includes tables, queries, forms, and reports related to faculty. In Access, you use tables to store data, queries to retrieve data, forms to enter data, and reports to display data.

To use a template to create a database:

Create Database Template
Create Database Template
  1. Start Access. The Getting Started With Microsoft Office Access screen appears.
  2. Click Local Templates. Icons representing local templates appear in the center of the window.
  3. Click the icon for the template you want to use.
  4. Click the Browse button. The File New Database window appears.
  5. Locate the folder in which you want to store your database.
  6. Click OK.
  7. Click Create. Access creates and opens your database.
Display Objects
Display Objects
  1. Open the Navigation pane. Access displays the tables, queries, forms, reports and other objects related to the database you selected. You may wish to display the objects by type.
Question How do I create a database based on the templates that are found online?
Online templates fall into the following categories: Business, Education, Personal, and Non-profit. To create a database based on one of these templates:
  1. Start Access. The Getting Started With Microsoft Office Access screen appears.
  2. Make sure you are connected to the Internet.
  3. Click the category for the template you want to create. Icons representing Internet templates appear in the center of the window.
  4. Click the icon for the template you want to use to create your database.
  5. Click the Browse button Browse Button.
  6. Locate the folder in which you want to store your database.
  7. Click Download. Access prompts you.
  8. Click Continue. Access downloads and opens your database.
  9. Open the Navigation pane. Access displays the tables, queries, forms, reports, and other objects related to your database.
Question How do I open an existing database?
  1. Click the Office button. A menu appears.
  2. Click Open.
  3. Locate the folder in which you stored your database.
  4. Click the database name.
  5. Click Open. Access opens the database.
Tip Tip: You can also open an existing database by pressing Ctrl-O and then following steps 3 through 5.

Create a Blank Database

A blank database is a database with nothing in it. You must create all the tables, forms, reports, queries, and so on. If you cannot find a template that suits your needs, create a blank database. After you create the database, Access opens to a datasheet and makes available the tools you need to create objects. Creating tables is the first step in building a database. You will learn more about creating tables in the next lesson.

To create a blank database:

Create Blank Database
Create Blank Database
  1. Start Access.
  2. Click Blank Database.
  3. Type the name you want to give your database in the File Name field. Access will automatically append .accdb to the name.
  4. Click the Browse button. The File New Database window appears.
  5. Locate the folder in which you want to store your database. Note that the name of the file appears in the File Name field.
  6. Click OK.
  7. Click the Create button. Access creates the database and opens a datasheet with the Table Tools available to you.
Note the Table Tools in the upper-right portion of the Ribbon.
Table Tools
Question  What is a Datasheet?
In Access, data is stored in tables. A datasheet displays the information stored in a table in columns and rows. The columns are called fields and the rows are called records. You can use a datasheet to create a table, enter data, retrieve data, and perform other tasks.

Related Posts Plugin for WordPress, Blogger...