Docsity

Querying a Database - Microsoft Office - Lecture Slides, Slides of MS Microsoft Office skills

Partial preview of the text

Download Querying a Database - Microsoft Office - Lecture Slides and more Slides MS Microsoft Office skills in PDF only on Docsity!

Access Project 2

Querying a Database Using

the Select Query Window

Objectives

  • Create and run queries
  • Print query results
  • Include fields in the design grid
  • Use text and numeric data in criteria

Objectives

  • Join tables in queries
  • Perform calculations in queries
  • Use grouping in queries
  • Create crosstab queries

Opening the Database

  • Click the Start button on the Windows taskbar, point to All Programs on the Start menu, point to Microsoft Office on the All Programs submenu, and then click Microsoft Office Access 2003 on the Microsoft Office submenu
  • If the Access window is not maximized, double- click its title bar to maximize it
  • If the Language bar appears, right-click it and then click Close the Language bar on the shortcut menu

Creating a Query

  • Be sure the Ashton James College database is open, the Tables object is selected, and the Client table is selected
  • Click the New Object button arrow on the Database toolbar
  • Click Query
  • With Design View selected, click the OK button
  • Maximize the Query1 : Select Query window by double-clicking its title bar, and then drag the line separating the two panes to the approximate position shown on the next slide

Creating a Query

  • Drag the lower edge of the field box down far enough so all fields in the Client table are displayed

Including Fields in the Design Grid

Running a Query

  • Click the Run button on the Query Design

toolbar

Closing a Query

  • Click the Close Window button for the Query1 : Select Query window
  • Click the No button in the Microsoft Office Access dialog box

Including All Fields in a Query

  • Be sure you have a maximized Query1 : Select Query window with resized upper and lower panes, an expanded field list for the Client table in the upper pane, and an empty design grid in the lower pane
  • Double-click the asterisk at the top of the field list
  • Click the Run button
  • Click the View button on the Query Datasheet toolbar to return to the Query1 : Select Query window

Clearing the Design Grid

  • Click Edit on the menu bar
  • Click Clear Grid

Using Text Data in a Criterion

  • One by one, double-click the Client Number,

Name, Amount Paid, and Current Due fields to

add them to the query

  • Click the Criteria row for the Client Number

field and then type CP27 as the criterion

  • Click the Run button to run the query

Using a Wildcard

  • Click the View button on the Query Datasheet toolbar to return to the Query1 : Select Query window
  • If necessary, click the Criteria row below the Client Number field
  • Use the DELETE or BACKSPACE key as necessary to delete the current entry (CP27)
  • Click the Criteria row below the Name field
  • Type Fa* as the criterion

Using a Wildcard

  • Click the Run button to run the query
  • If instructed to do so, print the results by clicking the Print button on the Query Datasheet toolbar