You can use a SQL statement to quickly summarize data in a
table. For example, suppose you need to create a report showing the total
number of hours each employee worked over a quarter. Follow these steps:

  1. Open
    the database containing the HoursWorked table
    for the quarter, then click Queries in the objects list in the database
    window.
  2. Click
    New, Design View and OK.
  3. Click
    Close.
  4. Go to
    Query | SQL Specific | Data Definition.
  5. Enter
    the following statement:
    SELECT DISTINCTROW [HoursWorked].[Employee ID],
    SUM([Hours Worked].Hours) AS [Sum of Hours]
    FROM [Hours Worked]
    GROUP BY [Hours Worked].[Employee ID];
  6. Click
    Run.

The results will show total hours worked grouped by Employee
ID. This query can be saved and used to create the quarterly report.

Miss a tip?

Check out the Microsoft Access archive, and catch up on our most recent Access tips.

Help users increase productivity by automatically signing up for TechRepublic’s free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.