You are on page 1of 149

Microsoft

Access 2003

LY
MANUAL - ADVANCED LEVEL

ON
North American Edition

E
PL
M
SA
PAGE 2 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

© 1995-2006 Cheltenham Courseware Ltd.


Email: info@cheltenhamcourseware.com
Internet: http://www.cheltenhamcourseware.com
All trademarks acknowledged. E&OE.

© Cheltenham Courseware Ltd. 1995-2006 No part of this document may be copied without written permission from Cheltenham

LY
Courseware unless produced under the terms of a courseware site license agreement with Cheltenham Courseware.

All reasonable precautions have been taken in the preparation of this document, including both technical and non-technical proofing.
Cheltenham Courseware and all staff assume no responsibility for any errors or omissions. No warranties are made, expressed or
implied with regard to these notes. Cheltenham Courseware shall not be responsible for any direct, incidental or consequential
damages arising from the use of any material contained in this document. If you find any errors in these training modules, please
inform Cheltenham Courseware. Whilst every effort is made to eradicate typing or technical mistakes, we apologize for any errors
you may detect. All courses are updated on a regular basis, so your feedback is both valued by us and will help us to maintain the

ON
highest possible standards.

Sample versions of courseware from Cheltenham Courseware


(Normally supplied in Adobe Acrobat format): If the version of courseware that you are viewing is marked as NOT FOR TRAINING,
SAMPLE, or similar, then it cannot be used as part of a training course, and is made available purely for content and style review.
This is to give you the opportunity to preview our courseware, prior to making a purchasing decision. Sample versions may not be
re-sold to a third party.

For current license information


This document may only be used under the terms of the license agreement from Cheltenham Courseware.
E
Cheltenham Courseware reserves the right to alter the licensing conditions at any time, without prior notice.
Please see the site license agreement available at:
www.cheltenhamcourseware.com/agreement
PL

Look for this icon for the New features of this software version.
Look for this icon for the Enhanced features of this software version.
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 3 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

COURSE BASICS......................................................................................................................................................7
TOOLBARS .................................................................................................................................................................7
The Title Bar .......................................................................................................................................................7
The Menu Bar .....................................................................................................................................................7
The Tool Bar .......................................................................................................................................................8
INSTALLING THE SAMPLE FILES ................................................................................................................................8
USING THE NORTHWIND DATABASE ................................................................................................................9
INSTALLING THE NORTHWIND DATABASE .................................................................................................................9

LY
About Northwind.................................................................................................................................................9
Checking for Northwind ...............................................................................................................................9
Installing Northwind......................................................................................................................................9
REVIEW QUESTIONS ...............................................................................................................................................11
INTRODUCING STRUCTURED QUERY LANGUAGE .....................................................................................12

ON
WRITING SQL COMMANDS .....................................................................................................................................13
Structured Query Language (SQL) Bases ...................................................................................................13
Understanding SQL Statements ....................................................................................................................13
Understanding SQL Conventions ..................................................................................................................13
Understanding SQL Syntax ............................................................................................................................14
WRITING SQL QUERIES .........................................................................................................................................14
Using SELECT Statement ..............................................................................................................................14
Selecting All Data.............................................................................................................................................15
Selecting Specific Data ...................................................................................................................................15
E
Selecting Conditional Data .............................................................................................................................16
Using ORDER BY Statement .........................................................................................................................17
Sorting Data ......................................................................................................................................................18
Using Aggregate Functions ............................................................................................................................18
PL

Calculating Data ...............................................................................................................................................19


Using GROUP BY Statement.........................................................................................................................19
Grouping Data ..................................................................................................................................................20
WRITING SQL SUBQUERIES ...................................................................................................................................20
Creating a Subquery with Equality ................................................................................................................20
Creating a Subquery with an Aggregate Function ......................................................................................21
Using ANY and ALL Statements....................................................................................................................21
M

WRITING SQL JOINS ...............................................................................................................................................22


Understanding SQL Joins ...............................................................................................................................23
Creating a Simple Join ....................................................................................................................................23
Sorting a Join ....................................................................................................................................................23
SA

Creating Outer Joins........................................................................................................................................24


Creating Left Outer Joins ................................................................................................................................25
Creating Right Outer Joins .............................................................................................................................25
Creating Full Outer Joins ................................................................................................................................25
INSERTING DATA .....................................................................................................................................................26
Using INSERT Statement ...............................................................................................................................26
Understanding INSERT Statement Rules ....................................................................................................26
Inserting Data using VALUES ........................................................................................................................26
Inserting Data using Defaults .........................................................................................................................27
Inserting Data using SELECT ........................................................................................................................27
UPDATING DATA ......................................................................................................................................................27
Using UPDATE Statement..............................................................................................................................28
Updating All Rows............................................................................................................................................28
Updating Specific Rows ..................................................................................................................................28

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 4 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Updating Multiple Columns.............................................................................................................................28


DELETING DATA ......................................................................................................................................................29
Using DELETE FROM Statement..................................................................................................................29
Deleting Specific Rows....................................................................................................................................29
Deleting All Rows .............................................................................................................................................29
WRITING SQL QUERIES IN ACCESS 2003 .............................................................................................................29
Viewing SQL in Access 2003 .........................................................................................................................29
Understanding SQL in Access 2003 .............................................................................................................31
Writing SQL Specific Queries.........................................................................................................................32
Finding Help on SQL Queries ..................................................................................................................33
REVIEW QUESTIONS ...............................................................................................................................................34

LY
WORKING WITH MACROS ...................................................................................................................................36
AUTOMATING TASKS ...............................................................................................................................................36
Understanding Macros ....................................................................................................................................36
INTRODUCING THE MACRO DESIGN TOOLBAR .......................................................................................................37
The Macro Design Toolbar .............................................................................................................................37
Using the Macro Design Toolbar ...................................................................................................................38

ON
CREATING MACROS ................................................................................................................................................39
Creating New Macros ......................................................................................................................................39
TESTING AND DEBUGGING MACROS ......................................................................................................................42
Running a Macro ..............................................................................................................................................42
Stepping Through a Macro .............................................................................................................................43
MODIFYING MACROS ..............................................................................................................................................44
Modifying a Macro............................................................................................................................................44
CONDITIONAL PROGRAMMING IN MACROS .............................................................................................................45
Adding Conditions to Macros .........................................................................................................................45
E
Using the Expression Builder to create Conditions.....................................................................................46
Running Macros with Conditions ...................................................................................................................47
ADDING MACROS TO FORMS ..................................................................................................................................47
PL
Attaching Macros to a Form ...........................................................................................................................47
ADDING MACROS TO REPORTS ..............................................................................................................................50
Attaching Macros to a Report.........................................................................................................................50
FILTERING DATA......................................................................................................................................................52
Filtering Records ..............................................................................................................................................52
DOCUMENTING MACROS.........................................................................................................................................56
Commenting on Macros ..................................................................................................................................56
M

Printing Macro Definitions ...............................................................................................................................56


Viewing Macro Definitions...............................................................................................................................57
REVIEW QUESTIONS ...............................................................................................................................................57
PROGRAMMING ACCESS USING VISUAL BASIC .........................................................................................59
SA

USING MACROS VERSUS VISUAL BASIC .................................................................................................................59


Using Visual Basic Modules ...........................................................................................................................59
Converting Macros to Visual Basic Code .....................................................................................................60
UNDERSTANDING VISUAL BASIC CONCEPTS..........................................................................................................64
Understanding Modules ..................................................................................................................................64
Creating Modules .............................................................................................................................................64
Understanding Module Declarations .............................................................................................................66
Understanding Procedures .............................................................................................................................66
Using Naming Rules ........................................................................................................................................67
Declaring Variables..........................................................................................................................................68
Setting Variable Scope....................................................................................................................................68
Declaring Constants ........................................................................................................................................69
Using Methods..................................................................................................................................................69

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 5 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Using Arguments..............................................................................................................................................69
USING THE VISUAL BASIC EDITOR WINDOW ..........................................................................................................70
The Visual Basic Editor Window ....................................................................................................................70
Customizing the Visual Basic Editor Window ..............................................................................................70
Setting the Visual Basic Editor Options ........................................................................................................71
GETTING HELP WITH VISUAL BASIC .......................................................................................................................73
Using Microsoft Visual Basic Help ...........................................................................................................74
Getting Visual Basic Syntax Help ..................................................................................................................74
REVIEW QUESTIONS ...............................................................................................................................................75
USING DATA ACCESS PAGES............................................................................................................................77

LY
CREATING DATA ACCESS PAGES ...........................................................................................................................77
Using Data Access Pages ..............................................................................................................................77
Creating pages using the AutoPage..............................................................................................................78
Creating pages using the Page Wizard ........................................................................................................81
Creating pages using an Existing HTML Document ...................................................................................86
Creating pages using the Design View .........................................................................................................88
MODIFYING DATA ACCESS PAGES .........................................................................................................................89

ON
Choosing a Theme...........................................................................................................................................89
Adding Text .......................................................................................................................................................90
Adding Controls ................................................................................................................................................91
Formatting Text and Labels............................................................................................................................92
Aligning Content ...............................................................................................................................................92
Sizing Content ..................................................................................................................................................93
Adding Images..................................................................................................................................................94
Adding Backgrounds........................................................................................................................................94
SORTING DATA IN DATA ACCESS PAGES ...............................................................................................................95
E
Sorting Data ......................................................................................................................................................95
SUMMARIZING DATA IN DATA ACCESS PAGES .......................................................................................................96
Summarizing Data............................................................................................................................................96
PL
EDITING DATA IN DATA ACCESS PAGES ................................................................................................................97
Adding a New Record......................................................................................................................................97
Deleting a Record ............................................................................................................................................98
PROTECTING DATA IN DATA ACCESS PAGES.........................................................................................................98
Customizing Navigation Bar ...........................................................................................................................98
Protecting Fields...............................................................................................................................................99
REVIEW QUESTIONS .............................................................................................................................................100
M

CONVERTING ACCESS DATABASES .............................................................................................................101


CONVERTING DATABASES TO ACCESS 2003.......................................................................................................101
Converting Databases .............................................................................................................................101
SA

Converting Database Objects.................................................................................................................103


Enabling Databases.................................................................................................................................103
Sharing Databases across various Access versions ..........................................................................104
CONVERTING FROM ACCESS 2003 TO ACCESS 97 .............................................................................................106
Converting an Access 2003 database to an Access 97 database....................................................106
CONVERTING FROM ACCESS 2003 TO ACCESS 2000 .........................................................................................107
Converting an Access 2003 database to an Access 2000 database ...............................................107
REVIEW QUESTIONS .............................................................................................................................................108
CUSTOMIZING ACCESS 2003............................................................................................................................109
CONFIGURING ACCESS 2003 OPTIONS ...............................................................................................................109
Setting Access 2003 Options .......................................................................................................................109
Setting View Options .....................................................................................................................................111

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 6 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Setting General Options ..........................................................................................................................112


Setting Edit/Find Options ..............................................................................................................................114
Setting Keyboard Options .......................................................................................................................114
Setting Datasheet Options ......................................................................................................................115
Setting Forms/Reports Options..............................................................................................................117
Setting Pages Options...................................................................................................................................117
Setting Advanced Options ......................................................................................................................118
Setting International Options ........................................................................................................................120
Setting Error Checking Options..............................................................................................................121
Setting Spelling Options................................................................................................................................122

LY
Setting Tables/Queries Options .............................................................................................................122
CONFIGURING AUTOCORRECT OPTIONS .............................................................................................................124
Setting AutoCorrect Options.........................................................................................................................124
Excluding AutoCorrect Rules .......................................................................................................................124
Removing AutoCorrect Rules.......................................................................................................................125
Adding Replace AutoCorrect Rules.............................................................................................................125

ON
Removing Replace AutoCorrect Rules .......................................................................................................126
CUSTOMIZING MENUS AND TOOLBARS.................................................................................................................126
Opening Customize Dialog Box ...................................................................................................................126
Customizing Toolbars....................................................................................................................................127
Creating Custom Toolbars............................................................................................................................127
Removing Toolbars........................................................................................................................................130
Customizing Commands ...............................................................................................................................130
Adding Buttons to Toolbars ..........................................................................................................................131
Removing Buttons from Toolbars ................................................................................................................132
E
Customizing Options......................................................................................................................................132
REVIEW QUESTIONS .............................................................................................................................................133
MANAGING AND MAINTAINING ACCESS DATABASES ............................................................................135
PL

OPTIMIZING DATABASES WITH TABLE ANALYZER ................................................................................................135


Using the Table Analyzer..............................................................................................................................135
Renaming Tables ...........................................................................................................................................138
Adding Key Fields ..........................................................................................................................................139
OPTIMIZING DATABASES WITH PERFORMANCE ANALYZER ..................................................................................142
Using the Performance Analyzer .................................................................................................................142
DOCUMENTING DATABASES WITH DOCUMENTER ANALYZER ..............................................................................144
M

Using the Documenter Analyzer ..................................................................................................................144


Printing Documentation .................................................................................................................................145
Exporting Documentation..............................................................................................................................146
AVOIDING ERRORS WITH THE OBJECT DEPENDENCIES TASK PANE.....................................................................147
SA

Using the Object Dependencies Tool....................................................................................................147


REVIEW QUESTIONS .............................................................................................................................................149

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 7 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Course Basics

Toolbars

The Title Bar

LY
• The title bar is displayed along the top of almost all program, folder and dialog
box windows. It is used to display information such as the name of the
application (or folder) and the document you are working on. Information which
is displayed here may vary. The example shown illustrates the title bar for a
program called Microsoft Word, in which a document called Document1 has

ON
been opened or saved:

The Menu Bar


E
• The menu bar is located under the title bar, and contains a series of drop down
menus. The example shown illustrates the Microsoft Word Menu Bar:
PL

To execute Menu commands


M

• In most cases, you are asked to use the mouse to execute a series of menu
commands (e.g., File > Save As). What this means is that you select File from
the main menu, followed by Save As:
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 8 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

The Tool Bar


• The tool bar contains a series of icons, which allow you to achieve a desired
effect as quickly as possible. In the example shown, taken from the Microsoft
Word Formatting toolbar, to make the selected text bold, you would click on the
Bold icon:

LY
Installing the Sample Files

ON
• Use Windows Explorer to create a folder called Access 2003 Advanced
Samples, in the My Documents folder.
• If you are installing the sample files from the CD-ROM, place the CD-ROM in the
CD drive and copy the files from the
access_2003_advanced_usa\exercise_files to the My Documents\Access
2003 Advanced Samples folder.
• If these files have been copied to your network server, then ask your
E
trainer/supervisor for more information about how to copy these files to your
PC’s hard disk.
PL

• Notes for tutors:


The above instructions are for Windows that has not been set-up for a multi-
user environment (with individual profiles). The instructions above may require
modification within a Windows mutliuser environment. Where possible pre-
install the relevant work files prior to use by students/delegates.
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 9 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Using the Northwind Database


When you have completed this learning module you will have seen how to:
• Check for Northwind
• Install Northwind

Installing the Northwind Database

LY
About Northwind
• Northwind is a sample database which ships with Access 2003. It contains

ON
product and sales data for a fictitious company Northwind Traders.
• It is recommended that Northwind be installed to follow the lessons in this
manual.

Checking for Northwind


E
• Click the File Search button on the database toolbar:
PL

• In the Search text box of the Basic File Search task pane, type Northwind.
In the Search in area of the task pane, choose Everywhere from the drop
down menu.
• Click Go.
M

• If Northwind.mdb appears in the Search Results, double-click on the file to


open it and proceed to the next chapter.
• If Northwind is not found in the Search Results it will need to be installed.
SA

Installing Northwind
• Insert the Microsoft Office 2003 CD-ROM in the CD-ROM drive.
• Double-click Setup.

Note: If your computer has autorun enabled, you will be presented directly
with the Microsoft Office 2003 setup screen.

• Select Add or Remove Features.


• Click Next.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 10 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Select both the Access and Choose advanced customization of


applications checkboxes. Click Next:

LY


Microsoft Office Access subtree.

ON
Under Choose update options for applications and tools, select the

Under Sample Databases, select Run all from My Computer:


E
PL
M
SA

• Click Update.
• Once the installer completes, click OK to finish.
• Once the Northwind database is installed, search for it again and open it.

Note: You may notice that the Northwind database utilizes the older Access
2000 file format. Please note that all pictures and examples in this training
manual will display the new Access 2002-2003 file format. If you wish, you can
convert Northwind into an Access 2002-2003 database. For more information,
please refer to the file conversion chapter later in this manual.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 11 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Review Questions
How would you:
• Check for Northwind?
• Install Northwind?

LY
ON
E
PL
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 12 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Introducing Structured Query Language


When you have completed this learning module you will have seen how to:
• Understand SQL Statements, Conventions & Syntax
• Use SELECT Statement
• Select All Data
• Select Specific Data
• Select Conditional Data

LY
• Use ORDER BY Statement
• Sort Data
• Use Aggregate Functions
• Calculate Data
• Use GROUP BY Statement

ON
• Group Data
• Create a Subquery with Equality
• Create a Subquery with an Aggregate Function
• Use ANY and ALL Statements
• Understand SQL Joins
• Create a Simple Join
• Sort a Join
E
• Create Outer Join
• Create Left Outer Join
• Create Right Outer Join
PL

• Create Full Outer Join


• Use INSERT Statement
• Understand INSERT Statement Rules
• Insert Data using VALUES
• Insert Data using Defaults
M

• Insert Data using SELECT


• Use UPDATE Statement
• Update All Rows
• Update Specific Rows
SA

• Update Multiple Columns


• Use DELETE FROM Statement
• Delete Specific Rows
• Delete All Rows
• View SQL in Access 2003
• Understand SQL in Access 2003
• Write SQL Specific Queries
• Find Help on SQL Queries

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 13 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Writing SQL Commands

Structured Query Language (SQL) Bases


• Structured Query Language is called SQL for short.
• SQL consists of standard English words.
• Like all programming languages, SQL has specific conventions and grammatical
syntax.

LY
• A wide range of users can use SQL, including Database Administrators,
management personnel, application programmers, and other types of end users.

ON
Understanding SQL Statements
• SQL statement consists of reserved words and user-defined words:

Reserved words are a fixed part of SQL. They must be spelled exactly as
required and cannot be split across lines.

User-defined words are created by the user and represent names of various
database objects such as relations, columns, views, etc.
E
PL

Understanding SQL Conventions


• SQL is more readable if indentation and lineation are used.

• Each clause in a statement should begin on a new line.


• Start of a clause should line up with start of other clauses.
M

• If clause has several parts, they should each appear on a separate line and be
indented under the start of clause.

• Upper case letters represent SQL reserved words.


SA

• Lower case letters represent user-defined words.


• A vertical bar ( | ) indicates a choice among alternatives.
• Curly braces ( { } ) indicate a required element.
• Square brackets ( [ ] ) indicate an optional element.
• An ellipsis ( … ) indicates optional repetition (0 or more times).

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 14 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Understanding SQL Syntax


• The main elements in SQL are the statements and clauses which make up
statements.
• SELECT command indicates which fields are included in the query result.
• FROM clause indicates which table(s) the fields are retrieved from.

• The following is the syntax of the SELECT statement:

SELECT { * | [column_name] [, …] }

LY
FROM table_name

Writing SQL Queries

ON
Using SELECT Statement
• Data is selected using the SELECT statement.
• Order of the clauses cannot be changed.

SELECT [predicate] { * | [column_name] [, …] }


E
FROM table_name
[WHERE condition]
[GROUP BY column_name]
PL

[HAVING group_condition]
[ORDER BY column_name] ;

• SELECT command specifies which columns are to appear in the output.


• FROM clause specifies table or tables to be used.
M

• WHERE clause filters rows, subject to some conditions.


• GROUP BY clause forms groups of rows with the same column value.
• HAVING clause specifies conditions the grouped records must meet to be
displayed.
SA

• ORDER BY clause specifies the order of the output.


• Semicolon ; ends the SQL statement.

• Predicate is optional, and it restricts the number of results returned.


• There are four predicates:
ALL includes all records.
DISTINCT omits duplicate data in selected fields.
DISTINCTROW omits data based on entire duplicate records.
TOPn [PERCENT] limits the records to a number or percentage of records.

• Only SELECT and FROM are mandatory.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 15 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Use * as an abbreviation for ‘all columns’.

Selecting All Data


• Example 1: Retrieve All Columns, All Rows
(list full details of all staff)

SELECT sno, fname, lname, position, salary

LY
FROM staff;

• Example 2: Retrieve All data


(list full details of all staff)

SELECT *

ON
FROM staff;

The result table in either case is:


sno fname lname position bno salary
SL21 John White Manager B5 30000.00
SG37 Ann Beech Snr Asst B3 12000.00
SG14 David Ford Deputy B3 18000.00
SA9 Mary Howe Assistant B7 9000.00
E
SG5 Susan Brand Manager B3 24000.00
SL41 Julie Lee Assistant B5 9000.00
PL

Selecting Specific Data


• Example 3: Retrieve Specific Columns, All Rows
(produce a list of salaries for all staff, showing only the staff number, sno, the
M

first and last names, and the salary details)

SELECT sno, fname, lname, salary


FROM staff;
SA

The result table is:


sno fname lname salary
SL21 John White 30000.00
SG37 Ann Beech 12000.00
SG14 David Ford 18000.00
SA9 Mary Howe 9000.00
SG5 Susan Brand 24000.00
SL41 Julie Lee 9000.00

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 16 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Example 4: Calculated Fields


(produce a list of monthly salaries for all staff, showing the staff number, the
first and last names, and the salary details)

SELECT sno, fname, lname, salary/12


FROM staff;

The result table is:


sno fname lname col4
SL21 John White 2500.00

LY
SG37 Ann Beech 1000.00
SG14 David Ford 1500.00
SA9 Mary Howe 750.00
SG5 Susan Brand 2000.00
SL41 Julie Lee 750.00

ON
• Example 5: Named Calculated Fields
In the example above, the 4th column is labeled col4. To name this column use
AS clause:

SELECT sno, fname, lname, salary/12 AS monthly_salary


FROM staff;
E
The result table is:
sno fname lname monthly_salary
SL21 John White 2500.00
PL

SG37 Ann Beech 1000.00


SG14 David Ford 1500.00
SA9 Mary Howe 750.00
SG5 Susan Brand 2000.00
SL41 Julie Lee 750.00
M

Selecting Conditional Data


SA

• Example 6: Comparison Search Condition


(list all staff with a salary greater than 10000.00)

SELECT sno, fname, lname, position, salary


FROM staff
WHERE salary > 10000;

The result table is:


sno fname lname position salary
SL21 John White Manager 30000.00
SG37 Ann Beech Snr Asst 12000.00

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 17 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

SG14 David Ford Deputy 18000.00


SG5 Susan Brand Manager 24000.00

• Example 7: Compound Comparison Search Condition (AND / OR)


(list all staff with the position of Manager or Assistant)

SELECT sno, fname, lname, position


FROM staff
WHERE position = ‘Manager’ OR position = ‘Assistant’;

LY
The result table is:
sno fname lname position
SL21 John White Manager
SA9 Mary Howe Assistant
SG5 Susan Brand Manager

ON
SL41 Julie Lee Assistant

• Example 8: Pattern Match Search Condition (LIKE / NOT LIKE)


(list all staff with any assistant position, looking for string ‘Ass’ in their position)

SELECT sno, fname, lname, position, salary


FROM staff
WHERE position LIKE ‘%Ass%’;
E
The result table is:
PL

sno fname lname position salary


SG37 Ann Beech Snr Asst 12000.00
SA9 Mary Howe Assistant 9000.00
SL41 Julie Lee Assistant 9000.00

• Note: SQL has two special pattern matching symbols:


M

% percent represents any sequence of zero or more characters.


_ underscore character represents any single character.
SA

Using ORDER BY Statement


• Data is sorted using the ORDER BY statement.
• Data is sorted in Ascending order by default.
• To sort data in Descending order, use DESC clause.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 18 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Sorting Data
• Example 9: Single Column Ordering
(list salaries for all staff, arranged in descending order of salary)

SELECT sno, fname, lname, salary


FROM staff
ORDER BY salary DESC;

The result table is:

LY
sno fname lname salary
SL21 John White 30000.00
SG5 Susan Brand 24000.00
SG14 David Ford 18000.00
SG37 Ann Beech 12000.00
SA9 Mary Howe 9000.00

ON
SL41 Julie Lee 9000.00

• Example 10: Multiple Column Ordering


(list of all staff, arranged in ascending order of last name and position)

SELECT sno, fname, lname, position


FROM staff
ORDER BY lname, position;
E
The result table is:
sno fname lname position
PL

SG37 Ann Beech Snr Asst


SG5 Susan Brand Manager
SG14 David Ford Deputy
SA9 Mary Howe Assistant
SL41 Julie Lee Assistant
SL21 John White Manager
M

Using Aggregate Functions


SA

• There are five aggregate functions:

COUNT returns the number of values in a specified column.


SUM returns the sum of the values in a specified column.
AVG returns the average of the values in a specified column.
MIN returns the smallest value in a specified column.
MAX returns the largest value in a specified column.

• Each function operates on a single column of a table and returns single values:
- COUNT, MIN and MAX apply to numeric and non-numeric fields.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 19 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

- SUM and AVG apply to numeric fields only.


- COUNT(*) is a special use of COUNT which counts all rows of a table.

Calculating Data
• Example 11: Use of COUNT(*)
(find the total number of staff which have salary of 9000)

SELECT COUNT(*) AS count


FROM staff

LY
WHERE salary = 9000;

The result table is:


count
2

ON
• Example 12: Use of COUNT and SUM
(find the total number of Managers and the sum of their salaries)

SELECT COUNT(sno) AS count, SUM(salary) AS sum


FROM staff
WHERE position = ‘Manager’;

The result table is:


E
count sum
2 54000.00
PL

• Example 13: Use of MIN, MAX, AVG


(find the minimum, maximum and average staff salary)

SELECT MIN(salary) AS min, MAX(salary) AS max, AVG(salary) AS avg


FROM staff;
M

The result table is:


min max avg
9000.00 30000.00 17000.00
SA

Using GROUP BY Statement


• Data is grouped using the GROUP BY statement.
• Each item in SELECT list must be single-valued per group.
• All column names in SELECT list must appear in GROUP BY clause, unless the
name is used only in an aggregate function.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 20 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Grouping Data
• Example 14: Use of GROUP BY
(find number of staff in each branch and their total salaries)

SELECT bno, COUNT(sno), AS count, SUM(salary) AS sum


FROM staff
GROUP BY bno
ORDER BY bno;

LY
The result table is:
bno count sum
B3 3 54000.00
B5 2 39000.00
B7 1 9000.00

ON
Writing SQL Subqueries
• Some SQL statements can have a SELECT embedded within them.
• A subselect can be used in the WHERE clause of an outer SELECT, where it is
called a Subquery or Nested query.
E
PL
Creating a Subquery with Equality
• Example 15: Use of Subquery with Equality
(list the staff who work in the branch at ‘163 Main St’)

SELECT sno, fname, lname, position


FROM staff
M

WHERE bno =
(SELECT bno
FROM branch
WHERE street = ‘163 Main St’);
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 21 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Note: Inner SELECT finds branch number corresponding to branch at ‘163 Main
St’ which is (‘B3’). Outer SELECT then retrieves details of all staff who work at
this branch. The outer SELECT then becomes:

SELECT sno, fname, lname, position


FROM staff
WHERE bno = ‘B3’;

The result table is:

LY
sno fname lname position
SG37 Ann Beech Snr Asst
SG14 David Ford Deputy
SL21 John White Manager

ON
Creating a Subquery with an Aggregate Function
• Example 16: Use of Subquery with Aggregate Function
(list all staff whose salary is greater than the average salary)

SELECT sno, fname, lname, position, salary


FROM staff
WHERE salary >
E
(SELECT AVG(salary)
FROM staff);
PL

• Note: You cannot write ‘WHERE salary > AVG(salary)’. Instead, you can use
Subquery to find the average salary (17000), and then use outer SELECT to find
those staff members with a salary greater than this:

SELECT sno, fname, lname, position, salary


FROM staff
M

WHERE salary > 17000;

The result table is:


sno fname lname position salary
SA

SL21 John White Manager 30000.00


SG14 David Ford Deputy 18000.00
SG5 Susan Brand Manager 24000.00

Using ANY and ALL Statements


• ANY and ALL may be used with subqueries which produce a single column of
numbers.
• If Subquery is preceded by ALL, the condition will only be true if it is satisfied by
all values produced by the Subquery.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 22 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• If Subquery is preceded by ANY, the condition will be true if it is satisfied by any


values produced by the Subquery.

• Example 17: Use of ANY


(find staff whose salary is larger than the salary of at least 1 member of the
staff at branch B3)

SELECT sno, fname, lname, position, salary


FROM staff

LY
WHERE salary > ANY
(SELECT salary
FROM staff
WHERE bno = ‘B3’);

• Note: Inner SELECT produces the set {12000, 18000, 24000} and outer

ON
SELECT lists those staff whose salaries are greater than any of the values in this
set.

The result table is:


sno fname lname position salary
SL21 John White Manager 30000.00
SG14 David Ford Deputy 18000.00
SG5 Susan Brand Manager 24000.00
E
• Example 18: Use of ALL
(find staff whose salary is larger than the salary of every member of the staff at
PL

branch B3)

SELECT sno, fname, lname, position, salary


FROM staff
WHERE salary > ALL
(SELECT salary
M

FROM staff
WHERE bno = ‘B3’);

The result table is:


SA

sno fname lname position salary


SL21 John White Manager 30000.00

Writing SQL Joins

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 23 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Understanding SQL Joins


• In the previous examples, subqueries have provided results from the same
table.
• If result columns come from more than one table, we must use a join.
• To perform a join, you must include more than one table in the FROM clause,
using a comma as a separator and typically including a WHERE clause to specify
join column(s).
• It is also possible to use an alias for a table, named in the FROM clause. An
alias is separated from the table name with a space.

LY
Creating a Simple Join
• Example 19: Use of Simple Join

ON
(list names of all renters who have viewed a property)

SELECT r.mo, fname, lname, pno


FROM renter r, viewing v
WHERE r.mo = v.mo;

• Note: To obtain correct rows, include only those rows from both tables which
have identical values in the rno columns: r.mo = v.mo. These two columns are
E
the matching columns for two tables.

The result table is:


PL

mo fname lname pno


CR56 Aline Stewart PG36
CR56 Aline Stewart PA14
CR56 Aline Stewart PG4
CR62 Mary Tregear PA14
CR76 John Kay PG4
M

Sorting a Join
SA

• Example 20: Sort a Join


(for each branch, list names of staff who manage properties)

SELECT s.bno, s.sno, fname, lname, pno


FROM staff s, property_for_rent p
WHERE s.sno = p.sno
ORDER BY s.bno, s.sno, pno;

The result table is:


bno sno fname lname pno
B3 SG14 David Ford PG4

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 24 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

B3 SG14 David Ford PG16


B3 SG37 Ann Beech PG21
B3 SG37 Ann Beech PG36
B5 SL41 Julie Lee PL94
B7 SA9 Mary Howe PA14

Creating Outer Joins

LY
• With an inner join, if one row of a table is unmatched, the row is omitted from
the result table.
• Outer join retains rows which do not satisfy the join condition.
• Consider the following two simplified tables:

• BRANCH1

ON
bno bcity
B3 Seattle
B4 New York
B2 Atlanta

• PROPERTY_FOR_RENT1
pno pcity
E
PA14 Chicago
PL94 Atlanta
PG4 Seattle
PL

• Example 21: The INNER JOIN of these two tables

SELECT b.*, p.*


FROM branch1 b, property_for_rent1 p
WHERE b.bcity = p.pcity;
M

OR

SELECT b.*, p.*


SA

FROM branch1 b INNER JOIN property_for_rent1 p


ON b.bcity = p.pcity;

The result table is:


bno bcity pno pcity
B3 Seattle PG4 Seattle
B2 Atlanta PL94 Atlanta

• Note: The result table has two rows where the cities are the same. There are
no rows corresponding to the branches in New York and Chicago.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 25 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Creating Left Outer Joins


• Example 22: Left Outer Join
(list branches and properties which are in the same city along with any
unmatched branches)

SELECT b.*, p.*


FROM branch1 b LEFT JOIN property_for_rent1 p
ON b.bcity = p.pcity;

LY
The result table is:
bno bcity pno pcity
B3 Seattle PG4 Seattle
B4 New York NULL NULL
B2 Atlanta PL94 Atlanta

ON
• Note: Left outer join includes those rows of first (left) table which are
unmatched with rows from second (right) table. Columns from second table are
filled with NULLs.

Creating Right Outer Joins


E
• Example 23: Right Outer Join
(list branches and properties in the same city and any unmatched properties)
PL
SELECT b.*, p.*
FROM branch1 b RIGHT JOIN property_for_rent1 p
ON b.bcity = p.pcity;

The result table is:


bno bcity pno pcity
M

NULL NULL PA14 Chicago


B3 Seattle PG4 Seattle
B2 Atlanta PL94 Atlanta
SA

• Note: Right outer join includes those rows of second (right) table which are
unmatched with rows from first (left) table. Columns from first table are filled
with NULLs.

Creating Full Outer Joins


• Example 24: Full Outer Join
(list branches and properties in the same city and any unmatched branches and
properties)

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 26 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

SELECT b.*, p.*


FROM branch1 b FULL JOIN property_for_rent1 p
ON b.bcity = p.pcity;

The result table is:


bno bcity pno pcity
NULL NULL PA14 Chicago
B3 Seattle PG4 Seattle
B4 New York NULL NULL
B2 Atlanta PL94 Atlanta

LY
• Note: Full outer join includes those rows which are unmatched in both tables.
Unmatched columns are filled with NULLs.

ON
Inserting Data

Using INSERT Statement


• Data is inserted in the table using the INSERT statement:
E
INSERT INTO table_name [ (column_list) ]
VALUES (data_value_list);
PL

• Column_list is optional.
• If omitted, SQL assumes a list of all columns in their original order.
• Any columns omitted must be declared as NULL when the table is created,
unless DEFAULT is specified when creating the column.
M

Understanding INSERT Statement Rules


• Data_value_list must match column_list as follows:
SA

• Number of items in each list must be the same.


• Order of items must correspond directly to the position of items in two lists.
• Data type of each item in data_value_list must be compatible with data type
of the corresponding column.

Inserting Data using VALUES


• Example 25: INSERT … VALUES
(insert a new record into staff table supplying data for all columns)

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 27 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

INSERT INTO staff


VALUES (‘SG16’, ‘Alan’, ‘Brown’, ‘Assistant’, ‘B3’, 8300);

Inserting Data using Defaults


• Example 26: INSERT using Defaults
(insert a new record into staff table supplying data for all mandatory columns)

LY
INSERT INTO staff (sno, fname, lname, position, bno
VALUES (‘SG16’, ‘Alan’, ‘Brown’, ‘Assistant’, ‘B3’);

OR

ON
INSERT INTO staff
VALUES (‘SG16’, ‘Alan’, ‘Brown’, ‘Assistant’, ‘B3’, NULL);

Inserting Data using SELECT


• Second form of INSERT allows multiple rows to be copied from one or more
tables to another:
E
INSERT INTO table_name [ (column_list) ]
SELECT …;
PL

• Example 27: INSERT … SELECT


Assume there is a table staff_prop_count which contains names of staff and
the number of properties they manage:
staff_prop_count(sno, fname, lname, prop_cnt).
M

(populate staff_prop_count using staff and property_for_rent).

INSERT INTO staff_prop_count


(SELECT s.sno, fname, lname, COUNT(*)
SA

FROM staff s, property_for_rent p


WHERE s.sno = p.sno
GROUP BY s.sno, fname, lname);

Updating Data

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 28 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Using UPDATE Statement


• Data is updated in the table using the UPDATE statement:

UPDATE table_name
SET column_name1 = data_value1
[, column_name2 = data_value2 …]
[WHERE search_condition];

• SET clause specifies names of one or more columns which are to be updated.

LY
• WHERE clause is optional. If omitted, named columns are updated for all rows
in table. If specified, only those rows that satisfy search_condition are
updated.
• New data_value(s) must be compatible with the data type for the
corresponding column.

ON
Updating All Rows
• Example 28: UPDATE All Rows
(give all staff a 3% pay increase)

UPDATE staff
E
SET salary = salary*1.03;
PL

Updating Specific Rows


• Example 29: UPDATE Specific Rows
(give all Managers a 5% pay increase)

UPDATE staff
M

SET salary = salary*1.05


WHERE position = ‘Manager’;
SA

• Note: WHERE clause finds rows that contain data for Managers. Update is
applied only to these particular rows.

Updating Multiple Columns


• Example 30: UPDATE Multiple Columns
(promote David Ford (sno = ‘SG14’) to Manager and change his salary to
18000)

UPDATE staff

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 29 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

SET position = ‘Manager’, salary = 18000


WHERE sno = ‘SG14’;

Deleting Data

LY
Using DELETE FROM Statement
• Data is removed from the table using the DELETE FROM statement:

DELETE FROM table_name


[WHERE search_condition];

ON
• Search_condition is optional. If omitted, all rows are deleted from the table.
• This does not delete the table.
• If search_condition is specified, only those rows that satisfy the condition are
deleted.
E
Deleting Specific Rows
• Example 31: DELETE Specific Rows
(delete all staff that hold a Manager position)
PL

DELETE FROM staff


WHERE position = ‘Manager’;
M

Deleting All Rows


• Example 32: DELETE All Rows
(delete all records from the staff table)
SA

DELETE FROM staff;

Writing SQL Queries in Access 2003

Viewing SQL in Access 2003


• SQL is the language that Access 2003 uses to program query operations.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 30 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• To view and/or edit SQL statements while creating a Query, switch from
Design View to SQL View:

To open the SQL View


• Open a Query in Design View.
• From the main menu, choose View > SQL View:

LY
ON
To view a sample SQL statement
• For example, open the sample Northwind.mdb database.
• Click on the Queries button under the Objects pane of the Database window.
• Select a query named Employee Sales by Country:
E
PL
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 31 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Click on the Design button:

LY
• This will open the Design View for the selected query:

ON
E
PL

• While in Design View, from the main menu, choose View > SQL View.
• This will open the SQL View:
M
SA

• You can edit the SQL statement directly in this window.

Understanding SQL in Access 2003


• SQL statements are little different in Access than in the standard SQL.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 32 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Lets look at the example:

SELECT [First Name], [Last Name], Position


FROM [Staff Data]
WHERE Position = ‘Assistant’;

• The column names that contain spaces must be enclosed in square brackets

[ ].

LY
If the column name does not contain spaces, square brackets are not needed.

Writing SQL Specific Queries

ON
• SQL Specific queries are queries that can only be created using SQL statements.

There are three SQL Specific queries


• Union queries that combine corresponding fields from two or more tables into
one field in the query results.
E
• Pass-Through queries that send commands directly to ODBC databases.
• Data Definition queries that create or edit Access tables.
PL

To write an SQL Specific query


• Click on the New button while in the Queries page of the Database window:
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 33 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• In the New Query dialog box, select Design View and click OK:

LY
• In the Show Table dialog box, click Close without adding any table:

ON
E
• From the main menu, choose Query > SQL Specific > then select the type of
PL

query you want to create, Union, Pass-Through or Data Definition:


M
SA

Finding Help on SQL Queries


• As always, if you need more help, Access 2003 has more information on SQL
queries.
• To perform an online search, from the main menu, choose Help > Microsoft
Access Help:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 34 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

OR press the F1 key

OR click on the Help [?] toolbar button.

LY
• In the Access Help task pane, type "SQL Queries" into the Search for field,
and click on the green Start Searching button:

ON
In the Search Results task pane, click on the appropriate link to find
information on SQL queries:
E
PL
M
SA

Review Questions
How would you:
• Use SELECT Statement?
• Select All Data?
• Select Specific Data?
• Select Conditional Data?

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 35 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Use ORDER BY Statement?


• Sort Data?
• Use Aggregate Functions?
• Calculate Data?
• Use GROUP BY Statement?
• Group Data?
• Create a Subquery with Equality?
• Create a Subquery with an Aggregate Function?

LY
• Use ANY and ALL Statements?
• Understand SQL Joins?
• Create a Simple Join?
• Sort a Join?
• Create an Outer Join?
• Create a Left Outer Join?

ON
• Create a Right Outer Join?
• Create a Full Outer Join?
• Use INSERT Statement?
• Understand INSERT Statement Rules?
• Insert Data using VALUES?
• Insert Data using Defaults?
E
• Insert Data using SELECT?
• Use UPDATE Statement?
• Update All Rows?
PL

• Update Specific Rows?


• Update Multiple Columns?
• Use DELETE FROM Statement?
• Delete Specific Rows?
• Delete All Rows?
M

• View SQL in Access 2003?


• Understand SQL in Access 2003?
• Write SQL Specific Queries?
• Find Help on SQL Queries?
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 36 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Working with Macros


When you have completed this learning module you will have seen how to:
• Understand Macros
• Use the Macro Window Toolbar
• Create New Macros
• Run a Macro
• Step Through a Macro

LY
• Modify a Macro
• Add Conditions to Macros
• Use the Expression Builder to Create Conditions
• Run Macros with Conditions
• Attach Macros to a Form

ON
• Attach Macros to a Report
• Filter Records
• Comment on Macros
• Print Macro Definitions
• View Macro Definitions
E
Automating Tasks
PL

Understanding Macros
• Macros present a way of programming Access 2003 to perform a variety of tasks
and actions.
• Macros are easy to create - you simply select from the list of predefined actions
M

and their arguments.


• Each action performs a specific operation.
• Each action can have arguments, which specify additional information for that
action.
SA

• Macros are best for performing simple tasks, like opening and closing forms,
running reports, and displaying custom toolbars.

• Macros are individual Access objects listed in the Macros page in the Database
window:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 37 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• Once macros are created, you can attach them to an Event property of any
object in your database.

ON
Note: Access macros differ from macros in Office 2003 and other applications,
as Access does not record the keystrokes.

There are two cases when you must use macros


• When assigning specific actions to a key combination to be used globally in the
E
entire database.
• When assigning startup actions to the database, such as opening a switchboard
form at startup.
PL

Introducing the Macro Design Toolbar


M

The Macro Design Toolbar


SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 38 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Using the Macro Design Toolbar


• The Macro Names button adds a Macro Name column to the macro sheet:

OR from the main menu, choose View > Macro Names:

LY
ON
Macro Name column is added to the macro sheet:

• Conditions button adds the Condition column to the macro sheet:


E
PL

OR from the main menu, choose View > Conditions.

Condition column is added to the macro sheet:


M
SA

• Insert Rows button inserts one or more blank rows in the grid above the
selected row:

OR from the main menu, choose Insert > Rows.

• Delete Rows button deletes the selected row or rows:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 39 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

OR from the main menu, choose Edit > Delete Rows.

• Run button runs the macro:

LY
OR from the main menu, choose Run > Run.

ON
• Single Step button runs the macro one action at a time, displaying
intermediate information:

OR from the main menu, choose Run > Single Step.


E
PL

Creating Macros

Creating New Macros


• While in the Macros page of the Database window, click on the New button:
M
SA

• The Macro window opens, displaying the blank macro sheet.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 40 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Under the Action column, you will see the drop-down list which contains a list of
predefined actions for you to choose from:

LY
• The Comment column contains optional comments used for documenting

ON
macros.
• Once you select an Action, the pane on the bottom area displays the associated
Action Arguments:
E
PL
M

• Depending on the selected action, some arguments are required and some are
optional.
• For example, for the Close action, you can select an Object Type, such as
Form:
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 41 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Once the Object Type is selected, you can select an Object Name. Access will
list all available Forms in the current database:

LY
• The last argument is the Save option (required). Here, you can select what
type of actions Access should perform at the end:

ON
Note: The information pane at the bottom-right area of the Macro window
E
displays information about the part of the macro sheet that is currently active.
If you need more information, press the F1 key for help.
PL

• Close the Macro window and click Yes to save changes for your new macro:
M

• In the Save As dialog box, enter the name in the Macro Name field, then click
OK:
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 42 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• The new macro is now available in the Macros tab of the Database window:

LY
ON
Testing and Debugging Macros

Running a Macro
• Once you have created a macro, you will have to run it and see if it works.
E
• You can run the whole macro at once, or you can run step-by-step through the
macro.
• If you get an error while running a macro, make sure you run through the
PL
macro step-by-step to find where the error occurs, and fix it.

To run a macro
• Select the macro name from the Macros page of the Database window.
M

• Click Run button:


SA

OR double-click the macro name

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 43 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

OR right-click the macro name and choose Run from the popup menu:

LY
Stepping Through a Macro

ON
If you have received an error while running a macro, you will have to step
through the macro in order to find the error and fix it.
E
To use the Single Step method to run a macro
PL
• Select the macro name from the Macros page of the Database window.
• Click Design button to open the Macro window:
M
SA

• While in the Macro window, click on the Single Step button:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 44 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Click on the Run button:

This will open the Macro Single Step dialog box:

LY


macro. This is the default option.
The Halt button stops macro execution. ON
The Step button moves to the next action, if there are more actions in the
E
• The Continue button stops the Single Step mode and runs the rest of the macro
without stopping.
PL

Modifying Macros
M

Modifying a Macro
• Select the name of the macro you want to modify from the Macros page of the
Database window.
SA

• Click Design button to open the Macro window.


• Use the Insert Rows toolbar button or the Insert menu command to add
actions.
• Use the Delete Rows toolbar button or the Edit menu command to delete
actions.
• Use the Cut, Copy, and Paste operations to edit a macro.
• Use the Undo button to reverse recent changes.
• When you have finished editing the macro, Save it again.
• Run and test your newly saved macro to make sure it works properly.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 45 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Conditional Programming in Macros

Adding Conditions to Macros


• By adding conditions to macros, you can specify if and when actions will happen.
• Conditions mean that if the condition is true, then the action(s) will be
performed. If the condition is not true, the macro will skip to the next action –
but only if there is one.

LY
• Macro conditions are added in the Condition column on the macro sheet:


ON
By default, the condition only applies to the action on the same row in the
macro sheet.
E
• If the condition is not met, the next action (i.e. the next row) will be executed.
• To extend the condition to the next action, you must enter the ellipsis (…) in the
Condition column of the next row:
PL
M
SA

• When debugging a macro, you can temporarily disable an action by entering


False in the Condition column:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 46 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
Using the Expression Builder to create Conditions

ON
• Right-click inside the Condition field where you want to create a condition, and
select Build from the popup menu.
• In the Expression Builder dialog box, create the logical expression (for
example if the Total Pages number is greater than 0) and click OK:
E
PL
M

• The new expression will be displayed in the Condition field:


SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 47 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Running Macros with Conditions


• When running macros with conditions, Access evaluates each condition and does
each of the following.
• If condition is TRUE, Access runs the action on that row first, then runs all
following actions that have an ellipsis (…) in the Condition column. Access then
runs any additional actions that have blank conditions until it encounters
another condition, comes across a macro name in the Macro Name column, or
reaches the end of the macro.
• If a condition is FALSE, Access ignores the action on that row and any

LY
subsequent actions that have an ellipsis (…) in the Condition column. Access
then moves to the next condition, if there is one:

ON
E
Note: The MsgBox action has a condition [CurrentRecord]=0, meaning if no
records are returned for the selected letter, display a message. Then Access
goes to the next action with an ellipsis (…) ShowAllRecords that will show all
PL

records. Then Access continues to the next action with an ellipsis (…) SetValue
that will press in the All button.

Adding Macros to Forms


M

Attaching Macros to a Form


SA

• First select the form in the Forms page of the Database window and click on
the Design button:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 48 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
ON
To attach the macro to a form event
• From the main menu, choose Edit > Select Form

OR press the Ctrl + R key combination.

• The Form is selected:


E
PL
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 49 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

To attach the macro to a section of the form


• Click the section selector (for example, Detail section):

LY
To attach the macro to a control in the form

ON
Select the control (for example, the Exit Microsoft Access button):
E
PL
M
SA

To attach the macro to the selected form property


• From the main menu, choose View > Properties

OR press the F4 key

OR right-click on the selection and select Properties from the popup menu
(available for section or control objects only).

• Click the Event tab to view a list of events that can occur for the selected
object.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 50 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Select the event you want to run the macro (for example, On Exit).
• Choose the Macro name from the drop-down list of available macros (for
example, Close):

LY
ON
• Save and close the form design.

Adding Macros to Reports


E
Attaching Macros to a Report
• Select the report in the Reports tab of the Database window and click on the
Design button:
PL
M
SA

To attach the macro to a report event


• From the main menu, choose Edit > Select Report

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 51 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

OR press the Ctrl + R key combination.

• The Report is selected:

LY
ON
To attach the macro to a section of the report
• Click the section selector (for example, Page Header section):
E
PL
M

To attach the macro to the selected form property


• From the main menu, choose View > Properties
SA

OR press the F4 key

OR right-click on the selection and select Properties from the popup menu
(available for the section or control objects only).

• Click the Event tab to view a list of events that can occur for the selected
object.
• Select the event you want to run the macro (for example, On Format).
• Choose the Macro name from the drop-down list of available macros (for
example, Sales Totals by Amount):

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 52 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Save and close the report design.

LY
Filtering Data

ON
Filtering Records
• The Northwind sample database contains a macro that alphabetically filters the
records in the Customer Phone List form.
• Open the Northwind database by selecting Help > Sample Databases >
Northwind Sample Database from the main menu.
• Click OK if the splash screen is displayed:
E
PL
M
SA

• In the Main Switchboard window, click on the Display Database Window


button:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 53 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• In the Database window, click on the Macros tab, then select the Customer
Phone List macro and click on the Design button:

ON
E
PL

• This will open the macro sheet:


M
SA

• In the Comment column, you can see that this macro is attached to the
Customer Phone List form. In order to see how the macro works, we should
run it first.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 54 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• In order to run the macro, we have to open the form attached to the macro.
• Go back to the Database window, click on the Forms tab, and select
Customer Phone List:

LY
ON
• Double-click on the form name to open it:
E
PL

• As you can see, the form has Alphabet buttons that will filter data when pressed.
Only the company names that start with a specified letter of the alphabet will be
M

displayed.
• Click on the Design button to see the underlined programming for this form:
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 55 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• The row of Alphabetic buttons are actually an Option Group control named
CompanyNameFilters, which returns a value depending on which button is
selected.
• If you open the Properties for this control, you will see that the macro
Customer Phone List.Alpha Button is attached to the After Update event.
This means that the macro will run when the user clicks one of the buttons in
the option group.

• Go back to the Customer Phone List macro sheet to see how this is done:

LY
• The Alpha Buttons macro applies a filter to the list, based upon which button is

ON
pressed.
• For example, if the A button is pressed, the macro will filter for company names
that start with
• Pressing on the A button will result in this company list:
E
PL
M

• Now go back to the Customer Phone List macro sheet and scroll down to the
last rows. In the GoToControl action row, the stated condition is that if the
current record count is greater than 0, the records are displayed and the macro
SA

stops. The ellipsis (…) in the StopMacro action row carries over the condition
from the row above it:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 56 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• However, if no records are returned by the filter (based on the condition if the
current record count equal to 0), the message will be displayed in the MsgBox
action. When the user clicks OK to close the message window, all records are
displayed on the screen, as the ellipsis (…) in the ShowAllRecord action row
carries over the condition from the row above it. Furthermore, the next action
row containing ellipsis (…) SetValue, will press depress the All button in the
form:

LY
ON
Documenting Macros

Commenting on Macros
• To make programming and future updates easier, make sure you comment
E
macros using the Comment column in the macro sheet:
PL
M
SA

Printing Macro Definitions


• In the Macros page of the Database window, select the macro name.
• From the main menu, choose File > Print

OR press the Ctrl + P key combination.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 57 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• In the Print Macro Definition dialog box, select what information you want to
print and click OK:

LY
• Properties include the container, date created, date of last update, owner, and
user.
• Actions and Arguments include all the actions with their conditions, as well as
values for all arguments.
• Permissions by User and Group include user permissions and group

ON
permissions.

Viewing Macro Definitions


• In the Macros page of the Database window, select the macro name.
• From the main menu, choose File > Print Preview and make the same
E
selections as for the Print option, as covered in the previous section:
PL
M
SA

Review Questions
How would you:
• Understand Macros?
• Use the Macro Window Toolbar?
• Create New Macros?

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 58 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Run a Macro?
• Step Through a Macro?
• Modify a Macro?
• Add Conditions to Macros?
• Use the Expression Builder to Create Conditions?
• Run Macros with Conditions?
• Attach Macros to a Form?
• Attach Macros to a Report?

LY
• Filter Records?
• Comment on Macros?
• Print Macro Definitions?
• View Macro Definitions?

ON
E
PL
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 59 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Programming Access Using Visual Basic


When you have completed this learning module you will have seen how to:
• Use Visual Basic Modules
• Convert Macros to Visual Basic Code
• Understand Modules
• Create Modules
• Understand Module Declarations

LY
• Understand Procedures
• Use Naming Rules
• Declare Variables
• Set Variable Scope
• Declare Constants

ON
• Use Methods
• Use Arguments
• Customize the Visual Basic Editor Window
• Set the Visual Basic Editor Options
• Use Microsoft Visual Basic Help
• Get Visual Basic Syntax Help
E
Using Macros versus Visual Basic
PL

• In this manual, we will cover only the basics of Visual Basic programming
regarding its use in Access 2003.
• If you want to learn more about Visual Basic, refer to one of the numerous
manuals and books on this subject.
M

Using Visual Basic Modules


• In the previous chapter, we have covered the use of Macros. Another way to
SA

program Access is writing Visual Basic modules.


• Certain procedures cannot be created in Macros - you must use Visual Basic to
write them.
• Examples of Visual Basic usages:
- Error handling
- Repetitive looping
- Custom functions
- Optimized performance, etc

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 60 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Converting Macros to Visual Basic Code


• There are two methods for converting Macros to Visual Basic (VB) code:
• Converting from the Macros page of the Database window – this is used when
you want to make VB code available to the whole database.
• Converting from the Form or Report Design view – this is used when you want
to store VB code with a form or report.

LY
To convert a Macro from the Database Window
• Click on the Macros tab in the Database window.
• Select a macro you want to convert to VB.
• From the main menu, choose Tools > Macro > Convert Macros to Visual
Basic

ON
OR from the main menu, choose File > Save As and in the Save As dialog
box, select Module under the As filed. Click OK to continue:
E
PL

• This will open up the Convert macro: macro_name dialog box:


M

• Check the Add error handling to generated functions and Include macro
comments options and click Convert.
SA

• The Convert macros to Visual Basic message box shows the conversion is
finished. Click OK.

• This will create Converted Macro – macro_name module, listed under the
Modules folder in the Visual Basic Editor window. Click on the module to see
the code:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 61 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
ON
• Scroll to the end of the code window to view the whole Visual Basic code:

E
PL
M

• The Function statement represents the global module that is available to the
entire database.
• The DoCmd statement performs macro action in a Visual Basic procedure.
SA

• Apostrophe (‘) marks the comment line.


• The newly created module is also listed in the Modules tab of the Database
window:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 62 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
ON
To convert Form’s Macro from the Design View
• Click on the Forms tab in the Database window.
• Select a form whose macro you want to convert to VB.
• Click on the Design view button.
• From the main menu, choose Tools > Macro > Convert Form’s Macros to
Visual Basic.
• This will open up the Convert form macros: macro_name dialog box:
E
PL

• Uncheck Add error handling to generated functions and check Include


macro comments options and click Convert.
• The Convert macros to Visual Basic message box shows the conversion is
M

finished. Click OK.

• Click on the Code toolbar button to open the Visual Basic Editor window with
SA

the converted macros code:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 63 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY

ON
Scroll to the end of the code window to view the whole Visual Basic code:
E
PL
M

• The Sub statement represents the local code, stored with a form.
• The DoCmd statement performs macro action in a Visual Basic procedure.
SA

• The Apostrophe (‘) marks the comment line.

To convert Report’s Macro from the Design View


• Click on the Reports tab in the Database window.
• Select a report whose macro you want to convert to VB.
• Click on the Design view button.
• From the main menu, choose Tools > Macro > Convert Report’s Macros to
Visual Basic.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 64 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• This will open up the Convert report macros: macro_name dialog box:

• Uncheck Add error handling to generated functions and check the Include
macro comments option and click Convert.

LY
• The Convert macros to Visual Basic message box shows the conversion is
finished.

Understanding Visual Basic Concepts

Understanding Modules


ON
The Visual Basic module consists of declarations and procedures.
Modules are used to create event procedures that execute when an event
occurs.
E
• There are two types of modules:

Module objects listed in the Modules page of the Database window.


PL

Form and Report modules stored together with a form or report containing
procedures and functions associated with a single form or report.
M

Creating Modules
• Click on the Modules tab in the Database window.
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 65 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Click on the New button:

LY
ON
• The new module, named Module1, opens up in the Visual Basic Editor
window:
E
PL
M
SA

• A newly created module has two or more sections:

Declarations section

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 66 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Procedure section(s)

• If you do not see the Option Explicit declaration, choose Tools > Options
from the Visual Basic Editor window’s main menu.

• In the Options dialog box, click on the Editor tab and check the Require
Variable Declaration option. Click OK to continue:

LY
ON
E
Understanding Module Declarations
• Declarations are listed in the first section of a module.
PL

• They set requirements and defaults on the module-level.

There are two default module-level declarations


M

• The Option Compare declaration specifies the default comparison method for
string data. This declaration requires an argument:
- Binary sorts string data based on the internal binary representation of
characters.
SA

- Text sorts in a case-insensitive text sort order.


- Database sorts in the same order as the database.

• The Option Explicit declaration forces the declaration of variables used in the
module.

Understanding Procedures
• Procedures consist of statements and methods.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 67 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• A statement is a complete instruction to Visual basic and consists of keywords,


operations, variables, constants, and expressions.

There are three types of statements


• Declaration statements used to name variables, constants or procedures.
• Assignment statements used to give a value or an expression to a variable or a
constant.

LY
• Executable statements used to trigger actions or jump to another location in
the procedure.

There are two types of procedures

ON
• A sub procedure is a program code that does not return a value. It usually runs
as a separate program called by an event in a form or report.
• Example of a sub procedure:

Sub sub_name (parameters)


DoCmd.command_name
End Sub
E
• A function procedure is a program code that returns a value as a result of a
calculation or comparison.
PL

• Example of a function procedure:

Function function_name (parameters) As type


calculation
End Function
M

Using Naming Rules


• In any programming, writing clear code is one of the most important practices.
SA

This helps you and others understand and maintain your code.
• In Visual Basic, there are several naming rules and practices:
• The first character must be a letter.
• The name has a maximum of 255 characters.
• Avoid the use of special characters and spaces, periods, exclamation marks, etc.
• Avoid the use of Visual Basic keywords.
• Avoid the use of same names for multiple variables in same procedures.
• Add prefixes to names that can indicate what type of item or variable they are:
- con used to indicate a constant
- int used to indicate an integer variable

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 68 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

- dte used to indicate a date variable


- str used to indicate a string variable
- rst used to indicate a recordset
- frm used to indicate a form

Declaring Variables
• Variables are items with unique names containing data that can be changed

LY
during procedure execution.
• You can specify the data type for each variable, or let Access assign the default
Variant type.
• A Variant type variable can contain string, date, time, Boolean, or numeric
values.
• The Dim statement is used to declare variables:

ON
Dim strName As String
Dim intAge As Integer, dteBirthday As Date, undeclared

• You can declare several variables in the same statement, separated by commas.
• In the above example, we have used prefixes to descriptively name the
variables in order to include their data type.
E
• The last variable has no data type declaration, so the type is Variant.
PL

Setting Variable Scope


• The Scope of a variable indicates the variable availability to procedures.
M

There are three levels of variable scope


• Procedure level is set when the variable is declared with a Dim statement in
the procedure.
SA

• Private module level is set when the variable is declared with a Private
statement in the declarations module section. The variable is available only to
procedures in that module.
• Public module level is set when the variable is declared with a Public
statement in the declarations module section. The variable is available to all
procedures in the application.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 69 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Declaring Constants
• Constants are items with unique names, within which data cannot be changed
during procedure execution. A constant data type can be a string or number
value, another constant, or an expression. The Const statement is used to
declare constants and give them a value:

Const conYear As Integer = 1990


Const conTitle As String = “President”

LY
• You can declare several constants in the same statement separated by commas.
• In the above example, we have used prefix con to descriptively name the
constants instead of their data types. You must assign a constant a value at the
time of declaration.

ON
Using Methods
• Methods are actions that database objects can perform, or procedures that
apply to database objects. Access 2003 modules can use nearly 160 methods
that apply to different database objects.
• Some examples of methods are:
- Opening or closing a form.
E
- Sounding a beep when a specific event occurs.
- Going to a specific field in a form.
- Filtering records for a report.
PL

- Printing multiple copies of a report, etc.

• Methods have specific syntax that indicate the object and the action:

SetFocus Forms![Customer Phone List]![Company Name].SetFocus


M

• In the example above, the method moves the cursor to the Company Name
field in the Customer Phone List form.
SA

Using Arguments
• Arguments are used in the sub or function procedure calls.
• They are optional, depending on the procedure.
• There are two ways you can list arguments: in a procedure order, or by name.
• For example, this is the sub procedure with an argument list:

Sub GetArguments (strName As String, dteBirthday As Date, intAge As Integer)

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 70 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• When you run the procedure, you can list the arguments in the same order as
the procedure:

GetArguments “John”, #11/12/1967#, 36

• Or, you can list the arguments using their names – in any order:

GetArguments dteBirthday:=#11/12/1967#, intAge:=36, strName:=”John”

LY
Using the Visual Basic Editor Window

ON
The Visual Basic Editor Window

E
PL
M
SA

Customizing the Visual Basic Editor Window


• Once you open the Visual Basic Editor window, you can change its look.
• From the main menu, choose View > then select the elements you want to see
in the editor window:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 71 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• In the Code view, the Object list box displays a list of all controls in the form or
report:

ON
E
• In the Code view, the Procedure list box displays a list of all procedures in the
module object:
PL
M

Setting the Visual Basic Editor Options


• Once you open the Visual Basic Editor window, you can change its features.
• From the main menu, choose Tools > Options.
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 72 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• This opens up the Options dialog box:

LY
ON
• The Code Settings group controls the code editing:

Auto Syntax Check option checks for syntax errors as you type the code.

Require Variable Declaration option includes the Option Explicit declaration in


new modules.

Auto List Members option displays a list of keywords as you type the code.
E
Auto Quick Info option displays syntax when you type a method or procedure
name.
PL

Auto Data Tips option displays the current value of a variable when you rest
your mouse pointer on the name.

Auto Indent option indents a line of code to match the previous line.
M

Tab Width option sets the number of characters for TAB key.

• The Window Settings group controls the editor window behaviors:


SA

Drag-and-Drop Text Editing option allows drag-and-drop editing in a module.

Default to Full Module view option shows all procedures in the module by
default.

Procedure Separator option displays a horizontal line between procedures.

• Click the Editor Format tab to specify the appearance of the different types of
text in the editor window:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 73 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• Click the General tab to set Form Grid Settings, Error Trapping and
Compile options:

ON
E
PL

• Click the Docking tab to allow docking for editor windows:


M
SA

Getting Help with Visual Basic

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 74 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Using Microsoft Visual Basic Help


• Open the Visual Basic Editor window.
• From the main menu, choose Help > Microsoft Visual Basic Help

OR press the F1 key

OR click on the Microsoft Visual Basic Help [?] button on the toolbar:

LY
• If you get the following message, you must install the Microsoft Visual Basic
Help first. Click on the Yes button, and follow the installation instructions:


ON
The Microsoft Visual Basic Help task pane opens up. Here you can find
extensive reference for various Visual Basic topics:
E
PL
M
SA

Getting Visual Basic Syntax Help


• While you are editing statements in the Visual Basic Editor window, you can
get syntax help from the Edit menu:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 75 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
OR right-click inside the statement and choose desired help from the popup

ON
menu.

• List Properties/Methods lists all properties and methods available for selected
statement:
E
PL

• List Constants lists all intrinsic constants that are valid for a specific item in the
argument list.
• Quick Info displays the complete syntax with the current item highlighted in
bold:
M

• Parameter Info displays the complete syntax with the current parameter
highlighted in bold:
SA

• Complete Word automatically completes the word when you begin typing.

Review Questions
How would you:
• Use Visual Basic Modules?

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 76 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Convert Macros to Visual Basic Code?


• Understand Modules?
• Create Modules?
• Understand Module Declarations?
• Understand Procedures?
• Use Naming Rules?
• Declare Variables?
• Set Variable Scope?

LY
• Declare Constants?
• Use Methods?
• Use Arguments?
• Customize the Visual Basic Editor Window?
• Set the Visual Basic Editor Options?
• Use Microsoft Visual Basic Help?

ON
• Get Visual Basic Syntax Help?
E
PL
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 77 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Using Data Access Pages


When you have completed this learning module you will have seen how to:
• Use Data Access Pages
• Create pages using the AutoPage
• Create pages using the Page Wizard
• Create pages using an Existing HTML Document
• Create pages using the Design View

LY
• Choose a Theme
• Add Text
• Add Controls
• Format Text and Labels
• Align Content

ON
• Size Content
• Add Images
• Add Backgrounds
• Sort Data
• Summarize Data
• Add a New Record
• Delete a Record
E
• Customize the Navigation Bar
• Protect Fields
PL

Creating Data Access Pages


M

Using Data Access Pages


• Data access pages allow you to connect Access databases to the Internet.
• With data access pages you can share database data and allow viewing and/or
SA

editing of dynamic data at your website.


• To display data access pages, the user must use Internet Explorer 5.5 or later
and have a Microsoft Office 2003 license.
• There are several ways to create data access pages:
AutoPage
Page Wizard
Existing HTML Document
Design View

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 78 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Creating pages using the AutoPage


• The quickest way to create data access pages is to use the AutoPage feature.
• AutoPage automatically adds all the fields from selected table or query.
• Data is displayed in a form-like style.

To create a data access page using AutoPage


• In the Database window, click on the Pages tab, then click on the New button:

LY
ON
E
• In the New Data Access Page dialog box, select AutoPage: Columnar:
PL
M
SA

• Choose the table or query where the object’s data comes from by
selecting it from the drop-down list:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 79 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• Click OK to create a data access page:

ON
E
PL
M

• At the bottom of the data access page, you will notice the Record Navigation
Bar.
• From the main menu, choose File > Save to open the Save As Data Access
SA

Page dialog box:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 80 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• Select the location and name the data access page and click Save.
• You may be asked whether you want to set the current folder as the default
location for data access pages. Click Yes to accept, or No to decline.

ON
• You may also see a warning dialog box. Click OK:

E
PL
• The new data access page is listed in the Pages section of Database window:
M
SA

To view a data access page in your browser


• Select the data access page in the Pages page of the Database window.
• From the main menu, choose File > Web Page Preview.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 81 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• The data access page opens in the browser window:

LY
ON
E
PL
Creating pages using the Page Wizard
• Another way to create data access pages is using the Page Wizard.
• The Page Wizard allows additional options for creating a data access page. For
example, you can choose fields from more than one table or query, grouping,
selecting multiple fields for sorting, etc.
M

To create a data access page using the Page Wizard


• In the Database window, click on the Pages tab, and then click on the New
SA

button.
• In the New Data Access Page dialog box, select Page Wizard and click OK to
continue:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 82 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
OR from the Pages page of Database window, double-click on Create data
access page by using wizard:

ON
E
PL

• This will open the Page Wizard dialog box.


• Select the table or query from the Tables/Queries drop-down list:
M
SA

• Under the Available Fields list, select one field and click the [>] button to
transfer it to the Selected Fields:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 83 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• If you want to select all the fields, click on the [>>] button:

ON
E
• If you want to remove a field from the Selected Fields list, select the field and
PL

click on the [<] button.


• Repeat the same steps for other tables and/or queries from which you want to
add fields to the data access page. Once you have finished selecting fields, click
Next button to continue.
M

To group data in the data access pages


• This page of the wizard allows you to add grouping levels.
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 84 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Select the field you want to group by, and click on the [>] button:

LY
ON
• A new grouping level will be added to the data access page. If you want to
choose the grouping interval, click on the Grouping Options button:
E
PL

• The Grouping Intervals dialog box allows you to choose how you want to
M

group the group-level field(s). Click OK to accept change or Cancel to close the
dialog box:
SA

• Back in the Page Wizard, click Next to continue.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 85 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

To sort data in the data access pages


• This page of the wizard allows you to sort records.
• Select the sorting field(s) from the drop-down lists:

LY
ON
• The default sorting order is ascending. If you want to change the sorting order,
click the Ascending button to change it into Descending:
E
PL
M
SA

• Once you have selected all of the sorting fields, click on the Next button to
continue.
• The last page of the wizard allows you to add a title to the page and set other
options:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 86 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• Open the page option takes you directly to the Page view.
• Modify the page’s design option takes you directly to the Design view.

ON
• Do you want to apply a theme to your page option allows you to add
predefined styles to the data access page.
• Display Help on working with the page option gives you help while working
on the page design.
• Click Finish. Depending on what you have selected, the page will be opened in
either the Page view or the Design view. This is a sample of the page in the
Design view:
E
PL
M
SA

Creating pages using an Existing HTML Document


• If you already have an HTML document that contains layout, graphics, and text
that you want to use in your data access pages, you can use the following
procedure to create a data access page.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 87 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

To create a data access page using an Existing Web page


• In the Database window, click on the Pages tab, and then click on the New
button.
• In the New Data Access Page select Existing Web page and click OK to
continue:

LY
ON
OR from the Pages page of the Database window, double-click on Edit Web
page that already exists:
E
PL

• This will open the Locate Web Page dialog box where you can select the
M

already existing web page. Click Open to continue:


SA

• This will open the web page in the Design view:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 88 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Creating pages using the Design View


• If you already have an HTML document that contains layout, graphics and text
you want to use in your data access pages, you can use the following procedure
to create a data access page.

LY
To create a data access page using an Existing Web page
• In the Database window, click on the Pages tab, and then click on the New
button.
• In the New Data Access Page select Design View and click OK to continue:

ON
E
OR from the Pages page of the Database window, double-click on Create data
PL

access page in Design view.

• This will open the blank page in Design view. Simply drag and drop fields from
the Field List window to the page grid and use the Toolbox to add controls to
the data access page:
M
SA

Note: If the Field List pane is not automatically displayed when opening the
page, from the main menu, select View > Field List.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 89 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Modifying Data Access Pages

Choosing a Theme
• In the Database window, click on the Pages tab.
• Select the data access page you want to modify and click the Design button:

LY

ON
Once the page is opened in Design view, from the main menu, choose Format
E
> Theme.
• This will open the Theme dialog box:
PL
M
SA

• Under the Choose a Theme list, select the theme you want, and you will see an
example in the right pane:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 90 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
ON
Note: If the theme you selected is not installed, the Install button is displayed
on the right pane. Click on the Install button to install the selected theme from
the Office 2003 CD.

• Vivid Colors option displays the text links and button colors with a brighter
color scheme.
• Active Graphics option refers to Animated GIF files.
• Background Image option activates or deactivates the background image.
E
• Set Default button sets the current theme as the default theme for all new data
access pages.
PL
• Click OK to apply the theme.

Adding Text
• You can add text to the page areas above or below the grid section header.
M

• Simply position the insertion point on the page and type the text:
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 91 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• The Grid section is the area generally used for data-related text and controls,
as the absolute positioning of the grid allows you to place fields in a structured
layout.

Adding Controls
• Controls are objects that can be placed on data access pages that display data,
perform actions, or can be used for visual display.

LY
• The Toolbox contains controls that you can add to the page design:

ON
ICON CONTROL DESCRIPTION
Label Used to display text on a page. Labels are useful for descriptive or
instructional text. Labels are not associated with a data source.
Bound Span Used to display data from a field in the database or result of an
expression.
Text Box Used to input data on a page. Text boxes are unbound to accept
E
input or display a calculation.
Scrolling Text Used to add a marquee for displaying scrolling text.
PL

Option Group Used to select a limited list of choices. Sometimes interchangeable


with List Boxes when selecting from only a few pre-defined options.
Option Button Used to set Yes/No values from an underlying query or table.

Check Box Used to set Yes/No values from an underlying query or table.
M

Drop-down Used to display a pre-determined list of values. Drop-down Lists are


List useful when limiting selection choices or when enforcing data
integrity.
List Box Used to display a pre-determined list of values. List boxes are useful
SA

when limiting selection choices or when enforcing data integrity.


Command Used to execute a pre-defined set of actions in a macro or event
Button procedure written in visual basic.
Expand Used to add a button for expanding and collapsing grouped records.

Record Used to add a Record Navigation bar that contains buttons for
Navigation display, edit, delete, sort, and filter.
Office Used to add a PivotTable. PivotTables can be associated with a data
PivotTable source.
Office Chart Used to add a Chart. Used for analyzing data.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 92 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Office Used to add Excel Spreadsheets for adding data or importing a


Spreadsheet spreadsheet from Excel.
Hyperlink Used to insert a link to a file or a web page.

Hyperlink Used to insert an image with a link to a file or a web page.


Image
Movie Used to insert a movie on a page.

LY
Image Used to insert an image on a page.

Line Used when displaying horizontal lines. Useful when displaying


breaks between fields within a page.
Rectangle Used when displaying rectangle shapes. Useful when displaying

ON
sections within a page.

Formatting Text and Labels


• In the page Design view, select the text or label(s) you want to format.
• From the Formatting (Page) toolbar, select any formatting tool and apply
E
appropriate formatting: Style, Font, Font Size, Bold, Italic, Underline, Align Left,
Center, Align Right, Decrease Indent, Increase Indent, Numbering, Bullets,
Fill/Back Color, Font/Fore Color, Line/Border Color, Line/Border Width, and
PL

Special Effect:
M

Aligning Content
SA

• In the page Design view, select the content you want to align.
• From the main menu, choose Format > Align > alignment option:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 93 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
OR right-click on the selection and select Align > alignment option from the
popup menu:

ON
E
Sizing Content
• In the page Design view, select the content you want to resize.
• From the main menu, choose Format > Size > sizing option:
PL
M
SA

OR right-click on the selection and select Size > sizing option from the popup
menu:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 94 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
Adding Images
• From the Toolbox, click on the Image button.
• Place the Image control on the page:


ON
This will open the Insert Picture dialog box. Select the image file you want to
E
place and click Insert.
PL
• To change various image properties, right-click on the image and select
Element Properties from the popup menu. Under the Format tab, you can
modify image border properties, height, width, margins, etc:
M
SA

Adding Backgrounds
• Data access page background can be displayed with flat color or a tiled image.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 95 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

To add a Background Color


• From the main menu, choose Format > Background > Color > Transparent
(default) or any other color:

LY
ON
To add a Background Picture
• From the main menu, choose Format > Background > Picture.
• This will open the Insert Picture dialog box. Locate your background image
and click Insert.
• The picture will automatically fill in the background in a tiled style.
E
Sorting Data in Data Access Pages
PL

Sorting Data
• In the page Design view, select the group section bar.
• Right-click the selection and choose Group Level Properties from the popup
menu.
M

• In the properties dialog box, enter the name of the field you want the records to
be sorted by in the DefaultSort property box:
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 96 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• If you cannot see the whole text in the property box, right-click on the box and
choose Zoom from the popup menu to zoom it up:

LY
• As usual, if the field name includes a space, make sure to enclose the name with
square brackets [ ].
• By default, the records are sorted in ascending order. If you want to switch to

ON
descending order, enter a space after the field name and then type DESC:

Summarizing Data in Data Access Pages


E
Summarizing Data
PL

• The AutoSum feature in the data access page Design view allows you to add
calculated summaries quickly to a page.
• In the page Design view, select the bound span control you want to summarize:
M

• Click on the AutoSum tool from the toolbar and choose from the list:
SA

• Save the page.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 97 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• From the main menu, choose File > Web Page Preview to see the summary
result:

LY
Editing Data in Data Access Pages
ON
E
• In data access pages, much the same as in the forms, you can use the Record
Navigation Bar to add, edit and delete records.
PL

Adding a New Record


• From the main menu, choose File > Web Page Preview.
• Notice the Record Navigation Bar at the bottom of the page:
M
SA

To add a new record


• From the Record Navigation Bar, click the New record button:

• Type the data in the first field.


• Press the TAB key to move to the next field.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 98 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Click on the Save button to save the record:

• Or click on the Undo button to undo the changes:

LY
Deleting a Record

ON
• From the main menu, choose File > Web Page Preview.
• Use the Next and Previous buttons on the Record Navigation Bar to locate
the record you want to remove.
• Click on the Delete button to remove the record:
E
• If the data access page does not display the changes, refresh the browser
PL

window by pressing the F5 key.

Protecting Data in Data Access Pages


M

Customizing Navigation Bar


SA

• The easiest way to protect the data in data access pages is to limit the Record
Navigation Bar functionality.
• In the page Design view, select the Navigation control:

• Right-click on selection and choose Navigation Buttons from the popup menu:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 99 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• Uncheck any button you want to remove from the Record Navigation Bar. For
example, uncheck the New button to disable adding new records:

ON
If you want to add the control back to the Navigation bar, check the button
again.
E
Protecting Fields
• If you want to protect only certain fields from editing, you can change their
PL

properties.
• In the page Design view, select the field you want to protect and open its
properties:
M
SA

• In the properties dialog box, click on the Other tab.


• Under the ReadOnly property box, select True to protect the field from editing.
• Save the page.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 100 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Review Questions
How would you:
• Use Data Access Pages?
• Create pages using the AutoPage?
• Create pages using the Page Wizard?
• Create pages using an Existing HTML Document?
• Create a page using the Design View?
• Choose a Theme?

LY
• Add Text?
• Add Controls?
• Format Text and Labels?
• Align Content?
• Size Content?

ON
• Add Images?
• Add Backgrounds?
• Sort Data?
• Summarize Data?
• Add a New Record?
• Delete a Record?
E
• Customize the Navigation Bar?
• Protect Fields?
PL
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 101 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Converting Access Databases


When you have completed this learning module you will have seen how to:
• Convert Databases
• Convert Database Objects
• Enable Databases
• Share Databases across various Access versions
• Convert an Access 2003 database to an Access 97 database

LY
• Convert an Access 2003 database to an Access 2000 database

Converting Databases to Access 2003

ON
• In Microsoft Access, incompatibility exists between different versions of Access.
Therefore, you will need to convert your database(s) to Access 2003 in order to
work on them.
• You can convert databases created with Access 2.0 or later to Access 2003.

Note: You do not need to convert 2002 databases in order to work on them in
Access 2003, as they both use the same file format.
E
PL

Converting Databases
• Before any conversion, you should first create a backup copy of your Access
database.
• If opened, close the database you want to convert.
• If the database is used in a multiple-user environment, make sure that all users
have closed the database.
M

• In an empty Access 2003 window, choose Tools > Database Utilities >
Convert Database > To Access 2002-2003 File Format from the main
menu.
SA

• In the Database to Convert From dialog box, select the database to be


converted to Access 2003, then click on the Convert button:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 102 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• In the Convert Database Into dialog box, enter the database name in the File

ON
name field, and then click on the Save button:

E
PL

• You will see the warning dialog box. Click on the OK button to proceed:
M
SA

Note: If your Access database has linked tables, make sure these tables
remain in the original folder, so that the converted database can find them. If
Access cannot find linked databases, the converted database will not work
properly. Linked tables are not converted automatically; so you must convert
them manually.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 103 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Converting Database Objects


• If you do not want all of the objects in the older-version database to be
converted to Access 2003, you can convert only specific objects: Tables,
Queries, Forms, Reports, Pages, Macros, and Modules.

To convert Database Objects to Access 2003


• Create a new Access 2003 database, or open an already existing one.

LY
• From the main menu, choose File > Get External Data > Import.
• In the Import dialog box, select the older-version database and click on the
Import button:

ON
E
• In the Import Objects dialog box, select the object(s) and click on the OK
PL

button:
M
SA

Enabling Databases
• In some cases, you might want to open an older-version Access database in
Access 2003 without converting it first. This may be necessary if some of the
database users do not have Access 2003.
• By enabling a database, you can still add, modify and delete records, but you
cannot modify any existing objects or add new objects using Access 2003.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 104 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

To enable a Database
• From the main menu, choose File > Open.
• Select an older-version Access database and click Open.
• In the Convert/Open Database dialog box, select the Open Database option
and click OK:

LY
ON
Note: You cannot import or link an Access 2003 table into an enabled
database.
E
PL

Sharing Databases across various Access versions


• You can also use a one-file database with several versions of Access by creating
a front-end / back-end database out of a one-file database.
• The oldest-version database file is the back-end containing all data.
• The Access 2003 database is the front-end containing all converted objects.
M

To create a one-file Access database


SA

• Convert the oldest-version database to Access 2003.


• Open the converted database and choose Tools > Database Utilities >
Database Splitter from the main menu.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 105 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• In the Database Splitter dialog box, click on the Split Database button:

LY
ON
• In the Create Back-end Database dialog box, the File name will be
automatically named with suffix “_be.” Keep that name and click on the Split
button:
E
PL
M

• Once you have split the database into front-end and back-end, delete the back-
end database.
• From the main menu, choose Tools > Database Utilities > Linked Table
Manager.
SA

• Link the new Access 2003 front-end to the tables in the older-version (back-
end) database.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 106 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Click the Select All button, and then OK to link all tables:

LY
Converting from Access 2003 to Access 97

ON
Converting an Access 2003 database to an Access 97 database
When converting an Access 2003 database to an Access 97 database, you will
lose any features and functionalities specific to the Access 2003 version.
E
To convert an Access 2003 to an Access 97 database
PL
• Before any conversion, you should first create a backup copy of your Access
database.
• If the database is used in a multiple-user environment, make sure that all users
have closed the database.
• Open the Access 2003 database.
• If the database has password protection for the code, open the Visual Basic
M

Editor first.
• From the main menu, choose Tools > Macro > Visual Basic Editor

OR press the Alt + F11 key combination.


SA

• In the Visual Basic Editor, choose Tools > Database_name Properties from
the main menu:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 107 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• In the Project Properties dialog box, select the Protection tab and enter the
password in the Password field, then click OK:

LY


ON
Close the Visual Basic Editor to return to the Access window.
From the main menu, choose Tools > Database Utilities > Convert
Database > To Access 97 File Format.
In the Convert Database Into dialog box, enter the database name in the File
E
name field, and then click on the Save button.
PL

Converting from Access 2003 to Access 2000

Converting an Access 2003 database to an Access 2000 database


M

• When converting an Access 2003 database to an Access 2000 database, you will
lose any features and functionalities specific to the Access 2003 version.
SA

To convert an Access 2003 to an Access 2000 database


• Before any conversion, the first step is to create a backup copy of your Access
database.
• If the database is used in a multiple-user environment, make sure that all users
have closed the database.
• Open the Access 2003 database.
• If the database has password protection for the code, enter the password
following the same steps used in the Access 2003 to Access 97 conversion, as
explained in the previous section.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 108 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• From the main menu, choose Tools > Database Utilities > Convert
Database > To Access 2000 File Format.
• In the Convert Database Into dialog box, enter the database name in the File
name field, and then click the Save button.

Review Questions

LY
How would you:
• Convert Databases?
• Convert Database Objects?
• Enable Databases?
• Share Databases across various Access versions?

ON
• Convert an Access 2003 database to an Access 97 database?
• Convert an Access 2003 database to an Access 2000 database?
E
PL
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 109 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Customizing Access 2003


When you have completed this learning module you will have seen how to:
• Set Access 2003 Options
• Set View Options
• Set General Options
• Set Edit/Find Options
• Set Keyboard Options

LY
• Set Datasheet Options
• Set Forms/Reports Options
• Set Pages Options
• Set Advanced Options
• Set International Options

ON
• Set Error Checking Options
• Set Spelling Options
• Set Tables/Queries Options
• Set AutoCorrect Options
• Exclude AutoCorrect Rules
• Remove AutoCorrect Rules
• Add Replace AutoCorrect Rules
E
• Remove Replace AutoCorrect Rules
• Open the Customize Dialog Box
• Customize Toolbars
PL

• Create Custom Toolbars


• Remove Toolbars
• Customize Commands
• Add Buttons to Toolbars
• Remove Buttons from Toolbars
M

• Customize Options
SA

Configuring Access 2003 Options

Setting Access 2003 Options


• Access 2003 allows you to customize the workplace by configuring many
available options.
• To access the options, choose Tools > Options from the main menu.
• In the Options dialog box, you can find more information on each option by
clicking on the Help [?] button first:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 110 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
ON
• The cursor will change to include the question mark, ?. Simply click on the
option name or option selection item (checkbox, radio button, drop-down list,
etc):
E
PL
M
SA

• Now you can read the information for the selected option:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 111 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
ON
• If you have made any changes to the current tab options, you can apply those
changes by clicking on the Apply button. Then you can click on another tab to
view/change more options.
• Otherwise, you can click on the OK button to apply changes and close the
Options dialog box.
E
Setting View Options
PL

• From the main menu, choose Tools > Options.


• From the Options dialog box, click on the View tab:
M
SA

• The Show group allows you to specify what features you will see when you
startup Access 2003:
• Status bar option shows or hides the status bar at the bottom of the screen.
• Startup Task Pane option shows or hides the Access side pane.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 112 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• New object shortcuts option shows or hides shortcuts in the Database window
that you can use to start a new database object. For example, in the Tables
page, the shortcut named “Create table in Design view” will create a table in the
Design view.
• Hidden objects option shows or hides objects in the Database window that
have the Hidden property. If shown, objects will appear as dimmed icons.
• System objects option shows or hides system tables as dimmed icons.
• Windows in Taskbar option shows a button on the Windows taskbar for every
open database object or window. You must have Internet Explorer Active

LY
Desktop feature installed for this option to work.

• The Show in Macro Design group allows you to change what you see while
working with macros:
• Names column option displays the Macro Name column in a macro sheet.
• Conditions column option displays the Condition column in a macro sheet.

ON
• The Click options in database window group controls how you work in the
Database window:
• Single-click open option opens an object with single mouse click.
• Double-click open option opens an object with a double mouse click. This is
the default setting.
E
Setting General Options
PL

• From the main menu, choose Tools > Options.


• From the Options dialog box, click on the General tab:
M
SA

• The Print margins group allows you to change the margins compatible with
your printer and paper size: Left margin, Right margin, Top margin, and
Bottom margin.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 113 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Recently used file list option specifies how many files are displayed when you
choose File from the main menu, or when the opening task pane appears.

• Provide feedback with sound option activates sound alerts.

• Compact on Close option automatically compacts and repairs the database


upon closing.

• Remove personal information from this file properties on save option

LY
removes your name, company name, or any other personal information.

• Default database folder option specifies the default folder where you will save
new databases.

ON
• The Use four-digit year formatting group allows you to apply the default
format to This database or All databases.

• The Name AutoCorrect group allows you to correct any problems that occur
when you make changes in an object:
- Track name AutoCorrect info option stores the information it needs to
correct naming errors.
- Perform name AutoCorrect option repairs naming errors as they occur.
E
- Log name AutoCorrect changes option generates a log named AutoCorrect
Log that contains the changes.
PL

• New database sort order option in Access 2003 now allows you to choose
from a list of 33 languages that change the default alphabetic sort order for new
databases.

• The Web Options button opens the dialog box where you can change the
default Appearance for both the Hyperlink color and the Followed hyperlink
M

color. You can also specify if you want to Underline hyperlinks:


SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 114 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Setting Edit/Find Options


• From the main menu, choose Tools > Options.
• From the Options dialog box, click on the Edit/Find tab:

LY
ON
• The Default find/replace behavior group specifies the extent of the search:
• Fast search option searches the current field only and matches the entire field.
• General search option searches all the fields and matches any part of the field.
• Start of field search option searches the current field and matches only the
beginning characters in the field.
E
• The Confirm group displays the message requiring confirmation from the user:
• Record changes option requires confirmation when a record changes.
PL

• Document deletions option requires confirmation when you delete a database


object.
• Action queries option requires confirmation when you run an action query.

• The Filter by form defaults for [current database] Show list of values in
M

group allows you to limit or expand the size of the value list displayed in the
Filter By Form window:
• Local indexed fields option limits the value list to the indexed fields in the
current database.
SA

• Local nonindexed fields option includes the non-indexed fields in the current
database.
• ODBC fields option includes fields in a linked table in an external source.
• Don’t display lists where more than this number of records is read option
sets the maximum number of records to be used to generate the list of unique
values for the field.

Setting Keyboard Options


• From the main menu, choose Tools > Options.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 115 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• From the Options dialog box, click on the Keyboard tab:

LY
• The Move after enter group controls what happens when you press the ENTER

ON
key:
• Don’t move option keeps the insertion point in the current field.
• Next field option moves the insertion point to the next field.
• Next record option moves the insertion point to the next record in the table or
form.
• The Arrow key behavior group controls what happens when you press the
RIGHT ARROW and LEFT ARROW keys:
• Next field option moves the insertion point to the next field when you press the
E
RIGHT ARROW key or previous field when you press the LEFT ARROW key.
• Next character option moves the insertion point to the next character when
PL
you press the RIGHT ARROW key or to the previous character when you press
the LEFT ARROW key.
• The Behavior entering field group controls what happens when the insertion
point enters the field:
• Select entire field option selects all of the characters in the field.
• Go to start of field option moves the insertion point in front of the first
M

character in the field without selecting any characters.


• Go to end of field option moves the insertion point to the end of the field after
the last character without selecting any characters.
• Cursor stops at first/last field option locks the inserting point within the
SA

current record and stops the RIGHT ARROW and LEFT ARROW keys from moving
the insertion point.
• Datasheet IME Control option sets the East Asian IME Mode set to "No
Control" when entering data into a table datasheet. (Note: The IME Mode
applies to all East Asian languages, and allows you to set the properties that
control the behavior of a field in a table, or a control in a form).

Setting Datasheet Options


• From the main menu, choose Tools > Options.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 116 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• From the Options dialog box, click on the Datasheet tab:

LY
ON
• The Default colors group allows you to change the colors of the following:
• Font option specifies the font color. Default setting is Black.
• Background option specifies the background color. Default setting is White.
• Gridlines option specifies the gridlines color. Default setting is Silver.

• The Default font group allows you to change the following:


• Font option specifies font name. Default setting is Arial.
E
• Weight option specifies font weight from Thin to Heavy. Default setting is
Normal.
• Size option specifies the font size from 8 to 72 points. Default setting is 10.
PL

• Underline option sets font style to underline.


• Italic option sets font style to italic.

• The Default gridlines showing group allows you to show or hide the following:
• Horizontal option shows or hides the horizontal gridlines in the datasheet.
M

• Vertical option shows or hides the vertical gridlines in the datasheet.


• Default column width option specifies the width of the columns in a new
datasheet.
SA

• The Default cell effect group specifies the cell effect from Flat, Raised or
Sunken.

• Show animations option shows movement in the datasheet.


• Show Smart Tags on Datasheets option - a new Access 2003 feature - shows
a Smart Tag Action button when moving to a control with an attached Smart
Tag.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 117 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Setting Forms/Reports Options


• From the main menu, choose Tools > Options.
• From the Options dialog box, click on the Forms/Reports tab:

LY
ON
• The Selection behavior group relates to the results of dragging a rectangle in
the design view to select controls.
• Partially enclosed option selects all controls with any part within the drawn
rectangle.
• Fully enclosed option selects only controls fully within the drawn rectangle.
E
• Form template option specifies an existing form template for new designs.
• Report template option specifies an existing report template for new designs.
PL

• Always use event procedures option takes you directly to the VB Editor
window when you click the Build button in the property sheet.
• Show Smart Tags on Forms option - a new Access 2003 feature - shows a
Smart Tag Action button when moving to a control with an attached Smart Tag.
• Use Windows Themed Controls on Forms option - a new Access 2003
M

feature - applies the Windows display theme that is currently set to Access
forms.
SA

Setting Pages Options


• From the main menu, choose Tools > Options.
• From the Options dialog box, click on the Pages tab:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 118 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
ON
• The Default Designer Properties group controls the sections’ design:
• Section Indent option specifies the default indent for each section.
• Alternate Row Color option specifies the color to display in alternate rows of
the group header and footer sections.
• Caption Section Style option specifies the default style for the caption section.
• Footer Section Style option specifies the default style for the footer section.
E
• The Default Database/Project Properties group controls the properties:
• Use Default Page Folder option specifies the default page folder. If checked,
enter the folder to use as a default page folder.
PL

• Use Default Connection File option specifies the default connection file. If
checked, enter the ODC or Microsoft Data link to use as a default connection file.

Setting Advanced Options


M

• From the main menu, choose Tools > Options.


• From the Options dialog box, click on the Advanced tab:
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 119 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• The DDE operations group controls how the database interacts with other
applications:

ON
• Ignore DDE requests option ignores Dynamic Data Exchange (DDE) requests
from external sources.
• Enable DDE refresh option allows DDE links.

• Command-line arguments option specifies values you want the Command


function to return.
• OLE/DDE timeout (sec) option specifies the time-period after which Access
will re-attempt to perform OLE or DDE operations.
E
• Refresh interval (sec) option specifies the time-period for updating DDE links
– if Enable DDE refresh option is checked. Enter a value between 1 and 32,766.
PL
• Number of update retries option specifies the number of times Access tries to
save a changed record locked by another user. Enter a value between 0 and 10.
• ODBC refresh interval (sec) option specifies the time-period after which
Access refreshes records you are accessing through ODBC connection. Enter a
value between 1 and 32,766.
• Update retry interval (msec) option specifies the time-period after which
M

Access tries to save a changed record locked by another user. Enter a value
between 0 and 1000.

• Default File Format option - enhanced in Access 2003 - allows you to choose
SA

between Access 2000 and Access 2002-2003 as a default file format for new
databases.

• The Default open mode group allows you to choose how you work with the
database on the network:
- Shared option allows others to open the database at the same time you have
it opened.
- Exclusive option gives you sole access to the database.

• The Default record locking group allows you to choose how the database
behaves while shared on the network:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 120 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

- No locks option does not lock records while they are being edited.
- All records option locks records in a form or datasheet as long as the form or
datasheet is open.
- Edited record option locks only the record currently being edited.

• Open databases using record-level locking option locks only one row or
record instead of locking an entire page that may have several records.

LY
Setting International Options
• From the main menu, choose Tools > Options.
• From the Options dialog box, click on the International tab:

ON
E
PL

• The Default direction group allows you to choose from two directions of the
text:
• Left-to-right option starts entering data in the left-most column and places the
next data in the column to the right, etc.
M

• Right-to-left direction option starts entering data in the right-most column and
places the next data in the column to the left, etc.

• The General alignment group gives you a choice between two modes:
SA

• Interface mode option sets General alignment consistent with the user
interface language. For example, if the direction is left-to-right, the text is left-
aligned.
• Text mode option sets General alignment according to the direction of the first
language-specific characters it encounters.

• The Cursor movement group controls the cursor moves within bidirectional
text that has various languages in the same sentence:
• Logical option moves cursor within bidirectional text according to the direction
of the language it is encountering. For example, for English words the insertion

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 121 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

point moves left-to-right, for Arabic words the insertion point moves right-to-
left.
• Visual option moves cursor within bidirectional text by moving to the next
adjacent character.

• Use Hijri Calendar option to change the setting to the Middle Eastern calendar.

LY
Setting Error Checking Options
• The Automatic Error Checking feature is new to Access 2003. Its function is
simple - to flag errors in report and form designs, and offer suggestions for
remedying them.
• From the main menu, choose Tools > Options.

ON
• From the Options dialog box, click on the Error Checking tab:

E
PL

• The Settings group allows you to activate error checking in Access, as well as
the manner in which error messages are displayed.
• Enable error checking option enables automatic error checking when checked.
M

• Error indicator color option allows you to choose the color of the error
indicator, which will appear in the upper-left comer of the error-causing control.
SA

• The Form/Report Design Rules group allows you to set specific guidelines
that dictate how a form or report can or cannot be designed. These include:
• Unassociated label and control option specifies that you cannot select a label
and a control that are not associated with one another.
• New associated labels option specifies that you cannot add a label to a form
or report that is not associated with another control.
• Keyboard shortcut errors option specifies that you cannot select a control
that demonstrates an invalid shortcut key.
• Invalid control properties option specifies that you cannot select a control
with invalid property values.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 122 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Common report errors option specifies that you cannot have a report with
invalid sorting and grouping definitions, and that the report cannot exceed the
paper width.

Setting Spelling Options


• From the main menu, choose Tools > Options.
• From the Options dialog box, click on the Spelling tab:

LY
ON
E
• Dictionary Language option specifies the language. English (U.S.) is default.
PL

• Add words to option specifies the dictionary file to which to add words.
• Suggest from main dictionary only option tries to suggest corrections only
from the main dictionary. If you want the spell check to use the custom
dictionary as well, uncheck this option.
• Ignore words in UPPERCASE option ignores uppercase words while
spellchecking.
M

• Ignore words with numbers option ignores words with numbers while
spellchecking.
• Ignore Internet and file addresses option ignores internet or file addresses
SA

while spellchecking.
• The Language-specific group options are specific and apply to different
languages.
• AutoCorrect Options will be discussed later in this manual.

Setting Tables/Queries Options


• From the main menu, choose Tools > Options.
• From the Options dialog box, click on the Tables/Queries tab:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 123 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• The Table design area includes:
• The Default field sizes group specifies the size for the Text data type fields,

ON
and the size for the Number data type fields.
• Default field type option sets the default data type.
• AutoIndex on Import/Create option sets automatic indexing for all fields that
start or end with the characters typed in this option box.

• The Show Property Update Options buttons allows you the discretion of
propagating property changes made in a table/query to controls that are bound
E
to that particular field.

• The Query design area includes:


PL

• Show table names option displays the table names in the Table row of the
query grid.
• Output all fields option displays all the fields in a query’s underlying tables and
queries when you run the query.
• Enable AutoJoin option automatically creates an INNER JOIN between two
tables in the query grid – if and only if they have fields with the same name and
M

same data type, and one of these fields is the primary key field for its table.

• The Run permissions group specifies if others are permitted to view data
SA

retrieved by queries or to run action queries:


• Owner’s option allows all users to view or run the query, but only the owner
can edit query.
• User’s option applies the permissions defined for that classification of user.

• The SQL Server Compatible Syntax (ANSI 92) group formats queries
exclusively in ANSI 92 standard syntax:
• This Database option applies formatting for the current database.
• Default for new databases option applies formatting for all new databases.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 124 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• The Query design font group - new in Access 2003 - allows you to set the
default font and font size for the results of your queries.
• Font option allows you to set the query result font type. The default is Tahoma.
• Font Size option allows you to set the query result font size. The default is 8.

Configuring AutoCorrect Options

LY
Setting AutoCorrect Options
• AutoCorrect options will automatically correct misspelled words as you type.
• From the main menu, choose Tools > AutoCorrect Options

ON
OR from the main menu, choose Tools > Options.

• From the Options dialog box, click on the Spelling tab.


• Click on the AutoCorrect Options button.

This will open the AutoCorrect dialog box:


E
PL
M
SA

• The AutoCorrect options are self-explanatory.


• Exceptions are covered later in this section.
• Replace With options are covered later in this section.

Excluding AutoCorrect Rules


• The Exceptions button opens the AutoCorrect Exceptions dialog box.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 125 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Click on the First Letter tab:

LY
• In the Don’t capitalize after field, type the abbreviation with the period at the
end.
• Click on the Add button to add this rule.

ON
• Click on the INitial CAps tab:

E
PL

• In the Don’t correct field, type the word you want to add.
• Click on the Add button to add this rule.
M

Removing AutoCorrect Rules


• The Exceptions button opens the AutoCorrect Exceptions dialog box.
• In the First Letter tab, or the INitial CAps tab, select the rule you want to
SA

delete.
• Click on the Delete button to remove the rule.

Adding Replace AutoCorrect Rules


• When you check the Replace text as you type option, you can specify which
words you can replace with correct words:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 126 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• In the Replace field, type a commonly misspelled word, or a word you want to
use as a shortcut to generate another word or symbol.
• In the With field, type the correctly spelled word, or the wanted word or
symbol.
• Click Add button.
• Click OK to close the AutoCorrect dialog box.

Removing Replace AutoCorrect Rules




Select the rule you want to remove.
Click on the Delete button:
ON
E
PL
M

Customizing Menus and Toolbars


SA

Opening Customize Dialog Box


• From the main menu, choose View > Toolbars > Customize

OR from the main menu, choose Tools > Customize

OR right-click anywhere on the toolbar or menu bar and select Customize from
the popup menu:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 127 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Customizing Toolbars

LY
• Using any of the methods described above open the Customize dialog box.
• Click on the Toolbars tab:

ON
E
PL

• This will list all available Toolbars, both built-in and custom.
• Check the check box for any toolbar you want displayed.
• Uncheck the check box for any toolbar you want to hide.
• Click Close when done.
M

Creating Custom Toolbars


SA

• Using any of the methods described above, open the Customize dialog box.
• Click on the Toolbars tab.
• Click on the New button:

• This will open the New Toolbar dialog box:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 128 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Type the Toolbar name and click OK.


• You will notice that a new, empty toolbar appears in addition to the Customize
dialog box, and that the new toolbar will appear in the Toolbars list:

LY
• ON
Make sure that the new toolbar is selected, and click the Properties button:
E
PL
M
SA

• This will open the Toolbar Properties dialog box:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 129 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• Toolbar Name option displays the name of the toolbar. You can edit the name
here.
• Type option allows you to choose what type of custom bar you want to create:
- Menu Bar

ON
- Toolbar
- Popup
E
• Docking option specifies what kind of docking is allowed for this custom bar:
PL

- Allow Any
- Can’t Change
- No Vertical
- No Horizontal
M
SA

• Show on Toolbars Menu option displays the toolbar name in the list or popup
menu.
• Allow Customizing option allows changes to the toolbar’s appearance or
behavior.
• Allow Resizing option allows resizing of the floating toolbar.
• Allow Moving option allows moving the toolbar between the floating and
docked position.
• Allow Showing/Hiding option allows showing or hiding the toolbar using these
methods:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 130 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

- Right-click a toolbar and check or clear the toolbar name in the popup menu.
- From the main menu, choose View > Toolbars and check or clear the toolbar
name in the list.
- Check or clear the toolbar name in the Customize dialog box, under the
Toolbars tab.

Removing Toolbars

LY
• Using any of the methods described above open the Customize dialog box.
• Click on the Toolbars tab.
• Select the toolbar you want to remove and click on the Delete button:

ON
E
PL

Customizing Commands
• Once you create a new toolbar, you can add Commands and/or buttons to it.
• Use any of the methods described above to open the Customize dialog box.
M

• Click on the Commands tab:


SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 131 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Choose the category you want under the Categories list.


• Choose the command you want under the Commands list. To find more
information about the command, click on the Description button.

Adding Buttons to Toolbars


• Under the Commands list, click on the button you want to add to the toolbar.

LY
• The cursor will change into an x:

ON
E
PL

• Drag the button toward the toolbar until the cursor changes to the plus sign +:
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 132 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• You will see a new button on the toolbar:

LY
ON
Removing Buttons from Toolbars
• With the Customize dialog box open, drag the button off the toolbar:
E
PL

OR right-click on the button and choose Delete from the popup menu:
M

Customizing Options
SA

• Using any of the methods described above, open the Customize dialog box.
• Click on the Options tab:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 133 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• The Personalized Menus and Toolbars group allows you to customize your
work with Menus and Toolbars:

ON
Show Standard and Formatting toolbars on two rows option displays the
two default toolbars on two rows – when available.

Always show full menus option displays all commands on menus.

Show full menus after a short delay option displays the most used
commands first. If you rest the mouse pointer over the menu, it expands to
E
show all commands.

Reset my usage data clears all automatically saved menu and toolbar settings.
PL

• The Other group allows you to customize how command bars look and behave:
Large icons option displays larger button images.
List font names in their font option displays the drop-down list of fonts in
their own font.
Show ScreenTips on toolbars option displays the name of the button when
M

the mouse pointer rests over the button.


Show shortcut keys in ScreenTips option displays the shortcut key
combination with the button name in the ScreenTip.
Menu animations option specifies whether or not menus are animated when
SA

displayed.

Review Questions
How would you:
• Set Access 2003 Options?
• Set View Options?
• Set General Options?

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 134 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• Set Edit/Find Options?


• Set Keyboard Options?
• Set Datasheet Options?
• Set Forms/Reports Options?
• Set Pages Options?
• Set Advanced Options?
• Set International Options?
• Set Error Checking Options?

LY
• Set Spelling Options?
• Set Tables/Queries Options?
• Set AutoCorrect Options?
• Exclude AutoCorrect Rules?
• Remove AutoCorrect Rules?
• Add Replace AutoCorrect Rules?

ON
• Remove Replace AutoCorrect Rules?
• Open Customize Dialog Box?
• Customize Toolbars?
• Create Custom Toolbars?
• Remove Toolbars?
• Customize Commands?
E
• Add Buttons to Toolbars?
• Remove Buttons from Toolbars?
• Customize Options?
PL
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 135 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Managing and Maintaining Access Databases


When you have completed this learning module you will have seen how to:
• Use the Table Analyzer
• Rename Tables
• Add Key Fields
• Use the Performance Analyzer
• Use the Documenter Analyzer

LY
• Print Documentation
• Export Documentation
• Use the Object Dependencies tool

ON
Optimizing Databases with Table Analyzer
• The Table Analyzer helps you optimize a database by reducing data
redundancy using a set of related tables, suggesting additional optimization,
adding more indexes, etc.
E
Using the Table Analyzer
• From the main menu, choose Tools > Analyze > Table.
PL

• This will open the Table Analyzer Wizard dialog box:


M
SA

• The first page of the wizard gives an introduction on how the Table Analyzer
looks at the problem. You can also click on the Show me an example buttons
to view an example. Click Next to continue.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 136 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• The second page of the wizard gives an introduction on how the Table Analyzer
solves the problem. You can also click on the Show me an example buttons to
view an example. Click Next to continue:

LY

ON
The next page of the wizard allows you to select which Tables you want to
analyze. To skip the introductory pages of the wizard next time you run the
Table Wizard, you should uncheck the Show introductory pages option. Click
E
Next to continue:
PL
M
SA

• The next page of the wizard allows you to decide how to split up the data. You
can let wizard decide, or you can decide. Click Next to continue:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 137 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
ON
• If you select the wizard to make a decision you might see the message
containing the wizard’s recommendation. If so, click OK.
• The next page of the wizard represents a diagram of the suggested
redistribution of information:
E
PL
M
SA

• You can see more instructions on how to handle the wizard’s suggestions by
clicking the Tips button at the top right-hand corner of the dialog box:

• Read the Tips instructions to help you implement the wizard’s suggestions:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 138 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• The wizard suggests that you create a Lookup Table for each field with a link

ON
from the original Employees table (Table1) to Table2 and Table3:

E
PL
M

Renaming Tables
• Once you approve the table structures, you have to Rename the proposed
tables. Select each table and click on the Rename Table button:
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 139 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
ON
• Enter the new Table Name and click OK:

E
• When you finish renaming tables, click on Next to continue.
PL

Adding Key Fields


• The next page of the wizard allows you to verify the primary key fields. Wizard
adds the Generated Unique ID primary key fields for newly generated tables.
The original table does not have the primary key.
M

• If there is a field that can be used as a primary key, select that field in the table
and click on the Set Unique Identifier button:
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 140 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
ON
• The field is now a primary key, marked with the key icon:

E
• To undo the change, select the field and click on the Undo button:
PL
M
SA

• If there is no field in the table that can be used as a primary key, you can assign
a generated key. Select the table without a primary key and click on the Add
Generated Key button:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 141 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• The generated primary key field is added, marked with the key icon:


ON
After adding primary key fields, click on Next to continue.
E
• On the final page, the wizard offers to create a query for you that looks like your
original table and has the same name. Letting the wizard create a query
ensures that you can continue to work with all the forms and reports created
PL

using the original table. Click Finish to close the wizard:


M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 142 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Optimizing Databases with Performance Analyzer


• The Performance Analyzer helps you optimize a database by analyzing all
objects in the database and suggesting ways you can improve the database
performance.

Using the Performance Analyzer


• From the main menu, choose Tools > Analyze > Performance.

LY
• The Performance Analyzer dialog box opens, containing tabs for each type of
database object:

ON
E
• Select the appropriate tab, or click on the All Object Types tab to list all
database objects.
PL
• Check the check box besides the object(s) you want to analyze and click the OK
button:
M
SA

• To analyze the entire database, click on the All Object Types tab and click on
the Select All button to check all objects. Click OK to start analyzer:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 143 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
• A Performance Analyzer message box displays the analyzing process:

ON
At the end of the process, the Performance Analyzer displays the Analysis
Results:
E
PL
M
SA

• Key icons specify what kind of information is contained in the finding list:
Recommendation, Suggestion, Idea or Fixed.
• Analysis Notes pane describes the results for the selected list item.
• If there are any Recommendations, you can click on the Optimize button to
implement analyzer’s recommendations.
• Click Close to close the Performance Analyzer.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 144 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Documenting Databases with Documenter Analyzer


• The Documenter Analyzer helps you document databases, which is one of
most important tasks in a database management system.

Using the Documenter Analyzer


• From the main menu, choose Tools > Analyze > Documenter.
• The Documenter dialog box opens, containing tabs for each type of database

LY
object:

ON
E
• Check the objects from each tab you want documented, or click the All Object
Types tab and click on the Select All button to document the whole database.
• Click on the Options button.
PL

• This will open the Print Table Definition dialog box:


M
SA

• The Include for Table group allows you to limit what table elements you want to
print:
- Properties
- Relationships

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 145 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

- Permissions by User and Group.

• The Include for Fields group allows you to limit what field information you want
to print:
- Nothing
- Names, Data Types, and Sizes
-Names, Data Types, Sizes, and Properties

• The Include for Indexes group allows you to limit what index information you

LY
want to print:
- Nothing
- Names and Fields
- Names, Fields, and Properties

• Click OK twice to start the Documenter.

ON
• The Status Bar displays the analysis progress.

Printing Documentation
• The report is opened in Print Preview:
E
PL
M
SA

• Right-click on the report to open the popup menu where you can configure Page
Setup and other print options:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 146 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

LY
Exporting Documentation
• Once you have generated the report you can export the documentation data.
• Right-click on the report to open the popup menu and select the Export option

ON
OR from the main menu, choose File > Export.

• This will open the Export Report dialog box where you can select the location,
file name and file type for export:
E
PL
M

• You can save the report in various Excel, HTML Document, Text File, Rich Text
Format, Snapshot Format and XML Document formats.
• Once you select the type under the Save as type field, click on the Export
SA

button:

• A Printer message box displays the exporting process:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 147 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Avoiding errors with the Object Dependencies task pane


• The Object Dependencies task pane is a new Access 2003 feature that assists
you in avoiding errors (i.e. those that occur when renaming queries, tables, or
fields), thus improving database performance. It helps you by displaying all of
the objects that depend on the object you are currently working on, as well the

LY
objects that your object relies upon.

Using the Object Dependencies Tool


• To use the Object Dependencies feature you must first activate the Name

ON
AutoCorrect feature, which tracks information about object interdependency.
• From the main menu, select Tools > Options.
• In the Options dialog box, click on the General tab:
E
PL
M
SA

• Click on the Track name AutoCorrect info checkbox, and in the displayed
dialog box, click OK:

• Click OK to close the Options dialog box.

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 148 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

• To view the Object Dependencies, select an object name in the Database


window:

LY
• From the main menu, select View > Object Dependencies

OR right-click on the object, and select Object Dependencies from the menu:

ON
E
• The Object Dependencies task pane will display a list of the objects that are
dependent on the object that you selected. To see a list of objects that your
object relies on, select the Objects that I depend on option button:
PL
M
SA

• You can also click on an expand (+) icon to see a complete list of object
elements:

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com
PAGE 149 - MICROSOFT ACCESS 2003 - ADVANCED LEVEL MANUAL

Review Questions
How would you:
• Use the Table Analyzer?
• Rename Tables?
• Add Key Fields?
• Use the Performance Analyzer?

LY
• Use the Documenter Analyzer?
• Print Documentation?
• Export Documentation?
• Use the Object Dependencies tool?

ON
E
PL
M
SA

FOR USE AT THE LICENSED SITE(S) ONLY


© Cheltenham Courseware Ltd. 1995-2006 www.cheltenhamcourseware.com

You might also like