Center for Academic Computing s3

Total Page:16

File Type:pdf, Size:1020Kb

Center for Academic Computing s3

Information Technology Services

Getting Started with MS Access

ITS@PennState 23 Willard Building University Park, PA 16802 [email protected] http://its.psu.edu/training/ Alternative Format Statement This publication is available in alternative media upon request.

Statement of Non-Discrimination The Pennsylvania State University is committed to the policy that all persons shall have equal access to programs, facilities, admission, and employment without regard to personal characteristics not related to ability, performance, or qualifications as determined by University policy or by state or federal authorities. The Pennsylvania State University does not discriminate against any person because of age, ancestry, color, disability or handicap, national origin, race, religious creed, sex, sexual orientation, or veteran status. Direct all inquires regarding the nondiscrimination policy to the Affirmative Action Director, The Pennsylvania State University, 328 Boucke Building, University Park, PA 16802-5901; tel. (814) 865-4700; TDD (814)863-1150. Table of Contents

Objectives...... 2

MS Access Interface...... 3

Finding A Record...... 6

Updating A Record...... 8

Entering A Record...... 8

Deleting A Record...... 9

Sorting Records...... 9

Filtering Records...... 10

Creating A Simple Query...... 14

Creating An AutoForm...... 17

Creating An AutoReport...... 18

Additional Resources...... 19 Objectives

 Open an existing MS Access database

 Navigate the MS Access interface

 Find a record

 Enter new data

 Update a record

 Delete information

 Sort, filter and query the database

 Prepare a simple form

 Prepare a simple report

Getting Started with MS Access Page 2 Summer 2004 Getting Started with MS Access

MS Access Interface Database Title Bar The Database Window

Database Toolbar or Action Bar

Database Window Object Bar Objects

The Database Object Bar

Getting Started with MS Access Page 3 Summer 2004 Definitions

A table is a collection of data about a specific topic; stores raw data A query is used to view, change, & analyze data in different ways A form is primarily used to enter or display data in a database A report is an effective way to present your data in a printed format A data access page is a special type of Web page designed for viewing & working with data A macro is a set of actions that help you to automate common tasks A module is a set of statements & procedures stored as one unit to organize Visual Basic code A group consists of folders containing shortcuts to the database objects that belong to it; you might create a group for the database objects that you use most often

Getting Started with MS Access Page 4 Summer 2004 Tables To open a table, you must 1) select the Tables object button, 2) choose the table you wish to open, and 3) click on the Open action button on the database toolbar.

Third, click on the Open action button

Second, choose the table First, select the you wish to open Tables object button

Datasheet View A window that displays data from a table in a row-and-column format. In Datasheet view, you can edit fields, add and delete data, and search for data.

Field

Record selector Record

Data value Subdatasheet

Primary key

Getting Started with MS Access Page 5 Summer 2004 Changing Views You can display a table in different views. There are three main ways to change the view: 1) using the View menu, 2) using the View button on the toolbar, or 3) right- clicking your mouse and choosing a new view from the pop-up menu.

1) View Menu 2) View Button on the Toolbar 3) Right-Click Mouse Button

Design View

In table Design view, you can create an entire table from scratch, add, delete, or customize the fields in an existing table.

Getting Started with MS Access Page 6 Summer 2004 Finding A Record

The Navigation Bar Go to the next Go back to the previous record record Enter a new record

Total number of records Go to the first record Go to the last record Active record

Using Find You can find a specific data value by using Find option using: 1) the Edit menu, 2) the Find button, or 3) a keyboard shortcut.

Getting Started with MS Access Page 7 Summer 2004 1) Edit Menu 2) Find Button 3) Keyboard Shortcut Ctrl + F

Enter the data value you are Click on the Find searching for tab Click the Find button

Choose where to look

Decide to match the whole field or a part of the field

Using Wildcards You use wildcard characters as placeholders for other characters when you are specifying a value you want to find and you:

Getting Started with MS Access Page 8 Summer 2004  Know only part of the value.

 Want to find values that start with a specific letter or match a certain pattern.

Getting Started with MS Access Page 9 Summer 2004 Updating A Record

Once you’ve found a specific data value, you can modify that value using the Replace option.

Type the data value you are searching for Click the Replace tab Click the Find Next button

To replace one Type the new instance of the data value in data value, click the Replace the Replace With window button

To replace all instances of the data value, click the Replace All button

Entering A Record Using the navigation bar, jump to the next available record. The record selector should point to the blank record. Begin entering new data. Use the tab key to move consecutively through the cells.

Record selector points to blank record

Getting Started with MS Access Page 10 Summer 2004 Deleting A Record To delete a record, click the cursor in the gray box to the left of the record you wish to select. Once the row is highlighted, either 1) go to the Edit menu and select Delete Record or 2) press the Delete key on your keyboard. A message box will appear asking you to confirm the deletion.

Selected record

Message box asking to Click OK to confirm and complete confirm the deletion the deletion.

Sorting Records You can sort records alphabetically or numerically in ascending (i.e. A to Z, 1 to 10) or descending (i.e. Z to A, 10 to 1) order. To sort, you can either 1) go to the Records menu and choose Sort, 2) click on the Sort button in the toolbar, or 3) right-click the mouse and select the appropriate sort option.

Getting Started with MS Access Page 11 Summer 2004 1) Records Menu 2) Sort Button on the Toolbar 3) Right-Click Mouse Button

Getting Started with MS Access Page 12 Summer 2004 Click on the field name to highlight the Click on field name column, then choose one of the above methods to sort the data in the field.

Filtering Records Use filters to temporarily view or edit a subset of records in a form or datasheet. There are four different types of filters: 1) filter by selection, 2) filter excluding selection, 3) filter by form, and 4) advanced filter/sort.

First, select the data Filter By Selection value you wish to filter on by clicking in the appropriate cell

Then, go to the Records menu and select Filter. From the Filter menu, choose Filter By Selection.

You could also click on the Filter By Selection button on the toolbar to apply the filter.

See the filtered results. Only the subset of data based on the data value selected is displayed.

Getting Started with MS Access Page 13 Summer 2004 Removing A Filter

To remove a filter, go to the Records menu and choose Remove Filter/Sort.

You can also click on the Remove Filter button on the toolbar.

Filter Excluding Selection This filter excludes a subset of records based on the data value selected. Apply the filter using the same method used in Filter By Selection: 1) select the data value you wish to exclude, 2) go to the Records menu, 3) select Filter, then 4) choose Filter Excluding Selection.

Then, go to the Records menu and select Filter. From the Filter menu, First, select the choose Filter Excluding data value you wish Selection. to filter on

Everything but the data value you selected will display.

Filter By Form

Getting Started with MS Access Page 14 Summer 2004 Filter By Form allows you to filter on one or more criteria. Start by going to the Records menu and selecting Filter. From the Filter menu, choose Filter By Form.

Go to the Records menu. Choose Filter, then Filter By Form.

You can also click on the Filter By Form button on the toolbar.

A blank template showing all the fields will display. Choose the data value(s) from the drop-down lists in the template.

To apply the filter, go to the Filter menu. Select Apply Filter/Sort. You can also click on the Apply Filter button on the toolbar.

The subset of records based on the data value(s) selected in the template will display.

Advanced Filter/Sort

Getting Started with MS Access Page 15 Summer 2004 The Advanced Filter/Sort also allows you to filter on one or more criteria as well as sort the results. Go to the Records menu and select Filter. Then, choose Advanced Filter/Sort.

Next, select Filter, then Advanced Filter/Sort.

First, go to the Records menu.

To select the fields you wish to filter on, click in the Field cell. A drop-down arrow will appear. From the drop- down list, choose the field(s) for which criterial will Table with fields Once the fields have been be set. selected, type the criteria for the field(s) in the If you wish to sort the Criteria cell beneath each results in ascending or field. descending order, select the appropriate option from the drop-down list in the Sort cell for the specific field.

To apply the Advanced Filter/Sort, go to the Filter menu and choose Apply Filter/Sort or click on the Apply Filter/Sort button on the toolbar.

The Advanced Filter/Sort results will display the fields, criteria and sort options you defined.

Getting Started with MS Access Page 16 Summer 2004 Creating A Simple Query

There are several types of queries in Microsoft Access: 1) Select, 2) Parameter, 3) Crosstab, 4) Action, and 5) SQL queries. In this class we will focus on the Select query since it is the most common type of query. It retrieves data from one or more tables and displays the results in a datasheet where you can update the records. You can also use a select query to group records and calculate sums, counts, averages, and other types of totals.

First, click on the Next, double-click on Queries Object Create query by using button. wizard. You may also click the New action button, then choose Simple Query Wizard by from the menu.

Select the source table/query from the drop-down list.

Getting Started with MS Access Page 17 Summer 2004 From the Available Fields window on the left, highlight the fields you wish to use in the query, then click the single right arrow to move each field to the Selected Fields window. If you wish to move all of the fields over, use the double right arrows. When finished, click the Next button.

Next, you must choose to display either detailed or summary information. If you choose Summary, you must click on the Summary Options button to select the type of summary information you wish to display.

When finished, click Next.

Type a name for the query. Select the appropriate radio button to either 1) open the query to view the information or 2) modify the query design.

When finished, click Finish.

Getting Started with MS Access Page 18 Summer 2004 View the query results in datasheet view.

Modifying A Query

To modify a query, you must switch to Design view. To do this, either 1) go to the View menu and select Design View or 2) click on the Design View button on the toolbar.

In Design view, you can add and delete fields, set criteria, sort and more.

Query in Design view uses the same method as the Advanced Filter/Sort to add fields, set criteria and sort.

When you have finished modifying the query in Design view, click on the Run button to run the query.

Getting Started with MS Access Page 19 Summer 2004 View the modified query results based on the defined criteria.

Creating An AutoForm

A form is a type of a database object that is primarily used to enter or display data in a database. Most forms are bound to one or more tables and queries in the database. A form's record source refers to the fields in the underlying tables and queries. A form need not contain all the fields from each of the tables or queries that it is based on. A bound form stores or retrieves data from its underlying record source. Other information on the form, such as the title, date, and page number, is stored in the form's design.

Second, select the type of Autoform you wish to create

Third, select the source First, select the Form table/query from Object button. the drop-down list.

Lastly, click OK when finished.

Getting Started with MS Access Page 20 Summer 2004 View the new AutoForm. Text boxes (bound form controls)

Labels (unbound form controls)

Creating An AutoReport

A report is an effective way to present your data in a printed format. Because you have control over the size and appearance of everything on a report, you can display the information the way you want to see it. Most reports are bound to one or more table and query in the database. A report's record source refers to the fields in the underlying tables and queries. A report need not contain all the fields from each of the tables or queries that it is based on. A bound report gets its data from its underlying record source. Other information on the form, such as the title, date, and page number, is stored in the report's design.

Second, select the type of report you would like to create.

First, select the Third, select the Reports Object source table/query button. from the drop-down list.

Lastly, click OK when finished.

Getting Started with MS Access Page 21 Summer 2004 View the finished AutoReport.

Additional Resources

MS Access 2002 Help

Help menu (Contents, Answer Wizard, Index tabs) F1 Ask a Question box Office Assistant

Books

Special Edition Using Microsoft Access 2002 by Roger Jennings The Complete Reference: Access 2002 by Virginia Andersen Mastering Access 2002 by Alan Simpson and Celeste Robinson Teach Yourself Microsoft Access 2002 Visually by Ruth Maran Instant Access Databases by Greg Buczek Microsoft Access 2002 Bible by Cary N. Prague and Michael R. Irwin Sams Teach Yourself Microsoft Access 2002 in 10 Minutes by Faithe Wempen

Getting Started with MS Access Page 22 Summer 2004 Microsoft Access 2002: At A Glance by Perspection Microsoft Access 2002: Step By Step by Catapult, Inc. Running Microsoft Access 2002 by John Viescas Microsoft Pocket Guide to Microsoft Access 2002 by Stephen L. Nelson

Websites http://its.psu.edu/training/ http://www.ohr.psu.edu/hrdc/home.cfm http://informit.com/ http://www.fgcu.edu/support/office2000/access/index.html http://www.cant.ac.uk/title/tutorials/access.htm http://www.microsoft.com/office/access/default.htm http://www.microsoft.com/office/access/using/default.htm http://www.cyber-matrix.com/access.htm http://www.course.com/downloads/NewPerspectives/office2000/access_main.html http://www.customguide.com/demos/access2000_2.pdf#page=13 http://databases.about.com/cs/tutorials/ http://ittraining.westmont.edu/access/tutorials.html http://cisnet.baruch.cuny.edu/holowczak/classes/2200/access/accessall.html

Phone Numbers

Help Desks

215 Computer Bldg (863-2494) 2 Willard Bldg (863-1035)

ITS Training Services (863-9522)

Getting Started with MS Access Page 23 Summer 2004

Recommended publications