Chapter: 7.6 Manipulation of Data Topic: 7.6.1 Query: E-Content of It Tools and Business System
Chapter: 7.6 Manipulation of Data Topic: 7.6.1 Query: E-Content of It Tools and Business System
Query
User can use a query to view a subset of data or to answer questions about user
data.
For example, if user wants to view a list of student names and email address, but
user do not want to see addresses and other data, user can create a query that
displays the student's first name, last name and email address only.
Open Tables or Queries in Query Design View
To open tables or queries in Query Design View
Page | 30
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Activate the Create tab.
Click the Query Design button in the Queries group. The Show Table dialog
box appears.
Activate the Tables tab if user wants to base their query on tables, activate
the Queries tab if user want base their query on queries or activate the Both
tab if user want to base their query on both tables and queries.
Click to choose the table or query on which user want to base their query.
Click Add. The table appears in the window.
Click to choose the next table or query on which user want to base their
query.
Continue clicking tables or queries until user have all the tables and
queries their plan to use.
Click Close. MS-Access changes to Query Design view.
Display All Records and All Fields
In Query Design view, each table has an option that allows user to display all of
the fields and all of the records in a table.
This option appears on the field line on the drop-down menu as the table name
followed by a period and an asterisk (tablename.*).
To display all records and all fields
Page | 31
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 32
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Sort a Query
While creating a query, user can sort the rows that they retrieve in ascending or
descending order by choosing the option of their need on the Sort row in Query
Design view.
Follow the steps to perform a sort
Page | 33
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 34
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 35
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Save a Query
User can save and return a saved query at any time.
To save a query
Page | 36
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 37
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 38
E-Content of
IT TOOLS AND BUSINESS SYSTEM
FIG 7.34: Department Form tab
User can use the Navigation bars to move through the records on a form.
1 Go to First Record
2 Go to Previous Record
3 The Current Record
4 Go to Next Record
5 Go to Last Record
6 Create a New (Blank) Record
To save a form
Click the Save button on the Quick Access toolbar. MS-Access saves the
form unless user are saving for the first time. If user saving for the first time,
the Save As dialog box appears.
Type the name user want to give the form.
Click OK. MS-Access saves the form. User can now access the form by using
the Navigation pane.
Modify a Form
After user creates a form, it opens in Layout view, where user can modify it.
To change the size of a field
Click a side of the field and drag to change the width of the field.
Click the top or bottom of a field and drag to change the height of a field.
To move a datasheet
Click the datasheet to select it.
Page | 39
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Click and drag the four-sided arrow in the upper-right corner to move the
datasheet.
To resize a datasheet
Click the datasheet to select it.
Click a side of the datasheet and drag to change the width.
Click the top or bottom of the datasheet and drag to change the height.
To apply an AutoFormat
Activate the Format tab.
Click Shape fill button and choose any color for background color.
User can also insert background image from gallery.
To change the font color, style, size click Select all button then choose the
appropriate changes.
Then navigate to Forms view to see the full structure of the form
Page | 40
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 41
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Reports
Reports organize and summarize data for viewing online or for printing.
A detail report displays all of the selected records.
Creating Reports
User can include summary data such as totals, counts, and percentages in a
detail report.
A summary report does not list the selected records but instead summarizes the
data and presents totals, counts, percentages, or other summary data only.
MS-Access has several report generation tools that user can use to create both
detail and summary reports quickly.
Use of Report Button
The Report button creates a simple report that lists the records in the selected
table or query in a column format.
To use the Report button
Page | 42
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Click the Report button in the Reports group. MS-Access creates report and
displays report in Layout view. User can modify the report.
Sections of Report
Page | 43
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 44
E-Content of
IT TOOLS AND BUSINESS SYSTEM
When using the Report Wizard, user can use fields from multiple tables
and/or queries if the tables/queries have a relationship.
Page | 45
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Group
User can group data by using Report Wizard.
Grouping puts all of the values in a field into a group based on the field’s
value.
Click to select the field which user want to group their data. User may not
see this page of the wizard if they are selecting data from a single table.
Click Next. The Report Wizard moves to the next page.
Page | 46
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 47
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 48
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 49
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 50
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Style
MS-Access supplies predesigned styles that format titles, labels, and more.
When user choose a style, the left side of the window displays a preview.
Page | 51
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 52
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Modify a Report
After creation of a report, user can modify it by adding groups or sorting, adding
fields, change labels and can perform many other tasks.
User can view a report in Report view, Layout view, design view and Print
Preview.
Change to Layout view
Open the report.
Activate the Home tab.
Click the View button. A menu appears.
Click Layout View. MS-Access changes to Layout view.
Page | 53
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 54
E-Content of
IT TOOLS AND BUSINESS SYSTEM
Page | 55
E-Content of
IT TOOLS AND BUSINESS SYSTEM
To add a field
Page | 56
E-Content of
IT TOOLS AND BUSINESS SYSTEM
To move a column
Open the report in Layout view.
Click the column label.
Drag the column to the new location. MS-Access moves the column to the
new location.
To change a title
Open the report in Layout view.
Double-click in the Title field.
Click and drag to select the current title.
Type a new title.
Click anywhere outside the Title field. MS-Access changes the title.
To change a field label
Open the report in Layout view.
Double-click the field label.
Click and drag to select the label name.
Type the new label name.
Click anywhere outside the label. MS-Access changed the field label..
To add page numbers
Open the report in Layout view.
Activate the Design tab.
Click the Insert Page Number button. The Page Numbers dialog box appears.
Click a radio button to choose a format.
Click a radio button to choose a position.
Click the down-arrow in the Alignment field and then choose an alignment.
Deselect Show Number On First Page if user do not want the page number to
appear on the first page.
Click OK. MS-Access places the page number in their report.
Page | 57