Access 97 for Windows Made Simple (Made Simple Books)
 9780750638005, 9781138436213, 0750638001

Table of contents :
Cover
Title
Copyright
Contents
Preface
1 Getting Started
What is a database?
Access objects
Preparing your data
Getting into Access
The Access screen
Summary
2 Help
Office Assistant
What's This?
Screen Tips
The Help menu
Summary
3 Building a database
Creating a new database
Creating a new table
Table Design window
Number data type
Text data type
Primary key
Saving the design
Closing a database
Summary
4 Data types
Opening a database
Adding a new table
AutoNumber
Date/Time
Input Mask
lookup
Yes/No
Memo and OLE Object
HyperLink
Currency
Summary
5 Relationships
Table Wizard
Checking relationships
Leaving Table Wizard
Relationships
Summary
6 Data entry and edit
Using Datasheet View
The lookup field
Pictures as OLE Objects
Hyperlinks to documents
Adding and deleting records
Using Form View
Summary
7 Redesigning a table
Adding a field
Deleting a field
Changing field properties
Primary key and indexes
Summary
8 Datasheet display
Gridlines
Hiding columns
Showing columns
Fonts
Widths and heights
Freezing columns
Print Preview
Page Setup
Printing your table
Summary
9 Sorting and searching
Find
Filter By Selection
Filter By Form
Sort
Multi-level sorts
Multi-table queries
Setting the query criteria
Reusing queries
Editing a query
Query Wizard
Summary
10 Forms
Designing a form
Headers and footers
Adding labels
Adding fields
Save your form
Form View
Summary
11 Reports
The Report Wizard
The design
Preview and print
Mailing labels
Summary
12 Database Wizard
Selecting a Wizard
Adding fields
Setting the style
The end product
Summary
Appendix
Type of Accommodation
Price
Accommodation
Contacts
Index

Citation preview

ISBN 978-1-138-43621-3

9 781138 436213

Routledge

www.routledge.com

Access 97 for Windows Made Simple

Moira Stephen

First published 1997 by Made Simple 2 Park Square, Milton Park, Abingdon, Oxon OX14 4RN 711 Third Avenue, New York, NY 10017, USA

Routledge is an imprint of the Taylor

&

Francis Group, an informa business

First issued in hardback 2017 Copyright

©

Moira Stephen, 1997

All rights reserved. No part of this book may be reprinted or reproduced or utilised in any form or by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying and recording, or in any information storage or retrieval system, without permission in writing from the publishers. Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. TRADEMARKS/REGISTERED TRADEMARKS Computer hardware and software brand names mentioned in this book are protected by their respective trademarks and are acknowledged.

British Library Cataloguing in Publication Data

A catalogue record for this book is available from the British Library

ISBN 978-0-7506-3800-5 (pbk) ISBN 978-1-138-43621-3 (hbk)



Typeset by P.K.McBride, Southampton

Icons designed by Sarah Ward© 1994

Archtype, Bash Casual, Cotswold and Gravity fonts from Advanced Graphics Ltd

Transferred to digital printing 2006

Contents 1

Preface

IX

...................................................................................

1

Getting Started What is a database? Access objects Preparing your data Getting into Access The Access screen Summary

2 4 6 8 9 10

..............................................................

.................................... .............. . . . .......... ..........

..............................................................

................................................................

...................................................................

..............................................................................

2

11

�elp Office Assistant What's This? ScreenTips The Help menu Summary

12 15 16 17 20

.....................................................................

..........................................................................

..............................................................................

.....................................................................

..............................................................................

3

21

Bui lding a database Creating a new database Creating a new table Table Design window Number data type Text data type Primary key Saving the design Closing a database Summary

...................................................

..........................................................

..........................................................

...............................................................

.....................................................................

..........................................................................

................................................................

22 24 26 27 28 29 30 31 32

...............................................................

..............................................................................

4

Data types Opening a database Adding a new table

33

............................................................

............................................................

34 35

AutoNumber 37 Date/Time 39 Input Mask 40 lookup 43 Yes/No .................................................................................. 45 Memo and Olf Object 47 Hyper Iink 48 Currency ................................................................................ 49 Summary .............................................................................. 50 .........................................................................

............................................................................

...........................................................................

..................................................................................

.........................................................

..............................................................................

5

51

Relationships Table Wizard Checking relationships leaving Table Wizard Relationships Summary

.........................................................................

........................................................

..........................................................

........................................................................

..............................................................................

6

Data entry and edit

52 56 58 59 62

63

Using Dotosheet View ......................................................... 64 The lookup field ................................................................. 67 Pictures as Olf Objects 68 Hyperlinks to documents 69 Adding and deleting records 70 Using form View 72 Summary 74 .......................................................

....................................................

..............................................

.................................................................

..............................................................................

7

Redesigning a table

75

Adding a field 76 Deleting a field ................................................................... 78 Changing field properties .................................................. 79 ......................................................................

VI

Primary key and indexes . 80 Summary .............................................................................. 82 ...................................................

8

83

Datasheet display

Gridlines . 84 Hiding columns 85 Showing columns 86 fonts . 87 Widths and heights . 88 freezing columns 89 Print Preview 90 Page Setup ........................................................................... 92 Printing your table . 93 Summary . 94 ..................................................................... .........

....................................................................

................................ .................................

....................................................................................

.............................................................

................................................................

.......................................................................

.......................................................... ..

........................... ..................................................

9

95

Sorting and searching find filter By Selection fi Iter By form Sort Multi-level sorts Multi-table queries Setting the query criteria Reusing queries fditing a query Query Wizard Summary

96 97 98 99 100 101 103 105 106 107 110

.......................................................................................

.

................. ............................................

.....................................................................

.......................................................................................

................................................................

...........................................................

................................................

.

............................................... ..................

..................................................................

......................................................................

.............................................................................

10 forms

Designing a form Headers and footers

................................................................

............................. ..............................

111

112 114

VII

Adding labels Adding fields Save your form form View Summary

......................................................................

.......................................................................

...................................................................

...........................................................................

...........................................................................

11

121

Reports The Report Wizard The design Preview and print Mailing labels Summary

122 126 128 129 134

.............................................................

..........................................................................

..............................................................

....................................................................

............................................................................

12

115 117 118 119 120

Database Wizard Selecting a Wizard Adding fields Setting the style The end product Summary

135

............................................................

136 137 138 140 142

.......................................................................

................................................................

................................................................

............................................................................

Appendix Type of Accommodation Price Accommodation Contacts

143 ...................................................

....................................................................................

.................................................................

..............................................................................

Index

VIII

144 144 145 146

177

Preface The computer is about as simple as a spacecraft, and who ever let an untrainedspaceman loose?You pickup amanual that weighs more than your birth-weight, open it and find that its written in computers peak. You see messages on the screen that look like code and the thing even makes noises. No wonder that you feel it's your lucky day if everything goes right. What do you do if everything goes wrong? Give up. Training helps. Being able to type helps. Experience helps. This book helps , by providing training and assisting with experience. It can't help you if you always manage to hit the wrong keys, but it can tell you which are the right ones and what to do when you hit the wrong ones. After some time, even the dreaded manual will start to make sense, just because you know what the writers are wittering on about. Computing is not black magic. You don't need luck or charms, just a bit of understanding. The problem is that the programs that are used nowadays look simple but aren't. Most of them are crammed with features you don't need ­ but how do you know what you don't need? This book shows you what is essential and guides you through it. You will know how to make an action work and why. The less essential bits can wait -and once you start to use a program with confidence you can tackle these bits for yourself. The writers of this series have all been through it. We know your time is valuable, and you don't want to waste it. You don't buy books on computer subjects to read jokes or be told that you are a dummy. You want to find what you need and be shown how to achieve it. Here, at last, you can.

IX

1

Getting Started

W h at is a d a t a b a s e ? ...................................... i . . . . 2 Access objects

....................................................... i

...

4

Preparin g y o u r d a t a ...................................... i , . . . 6 G e ttin g in to A c c e s s .......................................... i

...

8

th e Access s c r e e n ...............................................i , . . . 9 S u m m a ry

................................................................... i , . . . 1 0

1

What is adatabase? A database is simply a collection of data. For example, it may be an address list, employee details or details about items in stock.

you've II ne\ftr used database package before,

Access is a relational database - this means that all related data is stored in one place. If you are storing data about your business, you could have your employee data, customer data, product data, supplier data, etc. all stored in your company database.

ltuggestyoureadthrough the next

but you need to appreciate

In a relational database, all the data on one topic is stored in a table. You would have a table for your employee data, a table for your customer data, a table for your product data, etc. If your database requirements are fairly simple, you might have only one table in your database. If your requirements are more complex, your database may contain several tables.

how database a: works (in

theory)

become of familiar with some the Jargon you will come across. If you're already

I

The data in the table is structured in a way that will allow 1 you to interrogate the data when and as required . All of the data on one item, e.g .an employee or a stock item, is held in the record for that employee or stock item, within the appropriate table.

Arecord contains information about a single item in your table. All the detail relating to one employee will be held in that employee's record. All the detail on a customer will be held in a record for that customer. The information is broken down into several fields.

2

care­

fulfy. Databate concepts andjargontre notdifficult,

Table

Record

few paget

and to

familiarwithdatabasesyou canmoveonto'Oettinginto

Aceea'(page8).

a

field Afield is a piece of data within a record. In an employee's record things like forename, surname, job title, address , age, salary, etc. would all be held in separate fields . I n a stock item record, you would have fields for stock number, description, price, etc.

Each field has a name that identifies it.

Company database file

CUSTOMER

SUPPLIER TABLE

TABLE

EMPLOYEE TABLE

.....

Field names

L

Records

.....

..... .....

...

...... . ...

........ . .

EMPLOYEE TABLE

.....

F i rstname

Surname

Job Title

Start Date

Sa l a ry

Department

J en n i fe r

Atk i n son

Sa l es Ma nager

10/0 6/82

£29, 000

Sa l es

A n d rew

Mc P h e r s o n

Programmer

2 4/10/92

£16 , 450

Computer

Mat t h ew

Anderson

C o n s u l ta n t

01/01/93

£32 , 600

I n s u ra nce

A l i son

Duncanson

B uyer

14/08/88

£18 , 90 0

Purchasing

.._,

Fields

3

Access objects When working in Acces s , you find six different types of objects that are used to input, display, interrogate, print and automate your work. These objects are listed on the tabs in the Database window.

Tables Tables are the most important object in your database. Tables are used for data entry, viewing data and displaying the results of queries (see Chapters 3-9) .

In a table, each record is displayed as a row and each field is displayed as a column. You can display a number of records on the screen at any one time, and as many fields as will fit on your s creen. Any records or fields not displayed can be scrolled into view as required.

Queries You use queries to locate specific records within your tables. You might want to extract records that meet specific selection criteria (e.g. all employees on Grade Gin the accounts department). When you run a query, the results are displayed in a table (see Chapter 9) .

forms You can use forms to provide an alternative to tables for data entry and viewing records . With forms , you arrange the fields as required on the screen -you can design your forms to look like the printed forms (invoices , order forms , etc.) that you use. When you use forms , you display one record at a time on your screen (see Chapter 1 0) .

4

Reports Reports can be used to produce various printed outputs from data in your database . Using reports , the s ame database can produce a list of customers in a certain area, a set of mailing labels for your letters , or a report on how much each customer owes you, (see Chapter 11).

Macros and Modules

Macros and modules are used to automate the way you use Acces s , and can be used to build some very sophisticated applications.

They are well beyond the scope of a Made Simple book!

I

Rules far Dllllllf

When setting up your database� you needto name your Objects

{Tabler1 Quedec, Forme,Reports, Macrosand Modulet).

Object names can

be up to64 characten in length

They can Include any charactert except: a fullstop (.)

an e�tclamation mtrk (!)

an accent gravet) or

· w••t•t• ..

l.eamto·te•t�e••••·ttlase· · ttb$•lhevRittt�e�d..t · · · yourwork. .

s

Preparing your data The most important (and often difficult) stage in setting up your database takes place away from the computer. Before you set up a database you must get your data organised. You must ask yourself two key questions : •



What do I want to store? What information do I want to get out of my database?

NB

You must also work out your answers to these two questions!! Once you've decided what you are storing and what use you intend to make of the data, you are ready to start designing your database. Again, much of this can be done away from the computer.

What fields do you need?

Tip

When planning your database� take a small

sample of the data to be

You must break the data down into the smallest units you will want to search or sort on. Each of these must be in a separate field.

stored and e•amine 1t

If you were setting up names , you would probably break the name into three fields - Title, Firstname (or Initials) and Surname. This way you can sort the file into Surname order, or search for someone using the Firstname and Surname.

small units for sorting

If you were storing addresses , you would probably want separate fields for Town/city, Region and/or Country. You can then sort your records into order on any of these fields , or locate records by specifying appropriate search criteria. Forexample, using Town/city and Country fields, you could search for addresses in Perth (Town/city) ,

6

carelully.

Break

detail on each item and searching.

You

the

Into can

then start to work out

what fields will be needed

to enable you to store all

the necessary data fot each item.

Australia (Country) rather than Perth (Town/city) , Scotland (Country).

How big are the fields? You must also decide how much s pace is required for each field. The space you allocate must be long enough to accommodate the longest item that might go there. How long is the longest surname you want to store? If in doubt, take a sample of some typical names (McDonald, Peterson, MacKenzie, Harvey-Jones?) and add a few more characters to the longest one to be sure. An error in field size isn't as serious as an error in record structure as field sizes can be expanded without existing data being affected.

lakenofe

---- �

You can specify the size of text and number fields.

Text fields can be upto

255 characters in length

(the defaultis SO).

Number field sizes have

several options(see Field

Size in the on-fine Help).

It is very important that you spend time organising and structuring your data before you start to computerise it­ it'll save you a lot of time and frustration in the long run!

rr---�--

.,II

!I lake note II [I Spend time tltgllniling your data before yuu start 1

f

! I! 1

1'

II

I ll I

-

j

I' j

Declde

wbtltyou wanttostore, and wk111you wantto dowithit. Work •

.

j

..

but

hunting through existing data to update records is time

-·�·------·-·-····-·

·

.......................... ..

I

II

outwhatlleftfgarerequired(fortortlngandsearching). You can edit the structureof your table if necessary

1

��-

f

consuming,so it's bedto get it right to start wtth! I !l -bk==��====-----·-·I

II iI

r>

-----� -�---�- ---

II li li I 1 I

_1 l

7

Gett i ng into Access It is assumed that Access is already installed on your computer. If it isn't, you must install it (or get someone else to install it for you) before going any further. •



If you are already working in Windows, save any files that you want to keep, close the application(s) you are working in and return to the Desktop. If you are not working in Windows , switch on your computer (if necessary) and go into Windows.

You're now ready to start using Access. You can start Access through the Start Menu on the Taskbar orfrom the Microsoft Office Shortcut Bar (if you have it displayed) . Cl ick on Access Point to Programs

Basic steps o

1

2 3

From the Taskbar

C l ick the Start button on

the Taskbar.

Point to Programs. C l ick on Microsoft

4 5

Access.

1

Office Shortcut Bar

o

2

Select Blank Database. Cl ick From the Microsoft

Ill ·

C l ick the Microsoft Access tool Complete steps 4 and 5

above .

Sel ect B l ank Database

C l ick Start

8

C l ick OK

The Access screen Close the File New Database dialog box (click Cancel) , so that you can view the Microsoft Access screen. Looking at the Access screen, you can identify the standard elements of any Window: the Title bar, Menu bar and Toolbar; the Minimize , Maximize/Restore and Close buttons , and the Status bar. I suggest you Maximize the Access application window. This way other windows that may be open on your desktop won't distract you. Title bar

Max i m i ze/Restore

Too l bar

Basic steps

1

C l ick the Close button

IJI on the Title Bar .

or

2

Exiting Access When you have completed your session in Access , you must exit the package and return to the Windows environment (don 'tj ust switch off your computer!!) . To exit the package, use one of the methods suggested.

Open the File menu and choose Exit.

9

Summary o

o

o

o o o

o o

A database is a col l ection of data . Access is a relational database . In a relational database, a l l related data is stored 1n one place. A relational database 1s organi sed i nto tables, records and fields. In Access, you wi l l encounter various objects

tables,

queries, forms, reports, macros and modules . Preparation is the fi rst, very important step, i n setti ng

up your database . To get into Access, cl ick Start, Programs, Microsoft Access.

To get out of Access, cl ick the Close button on the Application window, or choose Exit from the File men u .

10

-

2 Help 1 !llliillllillllllllllllllilllllli!lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll!lllll!!lllll:llllllllllllll

Office Assistant . . . . . . . . . . . . . . . . . . .

i

12

W hal'i This? . . . . . . . . . . . . . . . . . . . . . 15 ScreenTips. . . . . . . . . . . . . . . . . . . . . . . . 16

1

The Help menu . . . . . . . . . . . . . . . . . . . 17 Summary . . . . . . . . . . . . . . . . . . . . . . . 20

'

Off i ce Assistant

Basic steps

When working in the Windows environment there is always plenty of help available- in books, in manuals, in magazines and on-line. The trick is being able to find the help you need , when you need it. In this section, we look at the various ways you can interrogate the on-line Help when you discover you're in need of it. One of the first things you'll notice when working with any of the Office 97 applications is the 'Office Assistant'. This new interface to the on-line help system is unique and replaces the Answer Wizard found in Office 95. The Office Assistant displays help topics and tips to help you accomplish your tasks . It interacts with you through its 'dialog bubble', rather than a standard dialog box! Choose an item

1



Create, modify, or enter data int o tables Create, modify,enter or

data into forms

Assistant press [F1 ] .

or

C l ick the Office

2

Assistant tool C l ick an item in the l ist for hel p on that topic.

or

3

4 5

C l ose the Ass i stant

To display the Office

and cl ick(•

Type in your question �arch

).

The Help topic(s) wi l l appear o n your screen . To close the on- l i ne

hel p cl ick the CloseIll

button at the top right

6

of the Hel p window. To close the Office Assistant, c l ick the CloseIll

button on its

title bar . Locate the hel p you need

Type a question and c l ick Search

12

:iU ill iS

See a n oilel'liew o f What tables are and how they worl< Create a table Open a table Add new data in Datasheet or Form View Customize a table

the page

Basic steps o

1

Tip of the day

If you have closed the Office Assistant, display

2

it - cl ick

).

C l ick the Tips button

(•

JJps

The Office

Assistant wi l l display its

3

(•\&���!) to

the next tip, or

(• �ack )

display

to go back to the

previous tip (if either option is dimmed , you are either at the beg i n n i ng or the end

4

of the l ist of tips) . When you 've f i n i shed viewing the tips, cl ick

(• Close).

To display its list of help options (which vary depending on what you are doing) , or to type in a question, simply give it a click!

Big Brother is watching you!

'Tip of the day' . Cl ick

You may keep the Office Assistant open while you work ­ you can drag it (using the title bar on the Office Assistant) to a suitable area of the screen (one that doesn't obscure what you are working on) and leave it there.

The Office Assistant is constantly monitoringyour actions. If you perform an action that there is a useful shortcut for, or a quick alternative method of doing, the Office Assistant lights up to indicate that it has a tip that you may find useful . Click the light bulb to display the tip. 'i

Tip of the day: tomove the

allow you

Holdingdown the Alt key and dragging a toolbar or menu item will selected control w�hout first displaying the Customize dialog box.

Scro l l through

I ! Tip I I The Office Assisttnt can give youtips I

I

the tips II

on

features

that are availableto you in Access. Manyof the tips

give you short cuts on howto perform particular tasks.

C l ick C l ose

IJ I l

'ai

13

Customising the Office Assistant

Basic steps

You can customise the Office Assistant to take on a different appearance or to behave in the way you find most useful.

o

Appearance

1

2 3

Go to Gal l ery

C l ick (o Qptions) in the Ass i stant ' s bubb l e . Select the Gal lery tab.

��1 Use

1,::��,� :>"�:.!



4

'

' ' '>

'

and

to see the

persona l i t i es .

C l ickI\':'·:�;,

:1

when

you find the one that you want to use.

o

View the choices

C l ick OK

Go to Options

5 6 7

Other options

8

options as req u i red .

OK

Cl ick(o Qptions).

Sel ect the Options tab . C l ick the checkboxes to select or deselect the Cl ick[

;·:l

: .· �:

lake note If

you

lea\le

the

Office

Assistant open while you work, (o

when

you

are

dialog boxes

14

)

Qptions

dimmed is

Insome

e.g. Open.

What's This?

Basic steps

1

Hold down the [Shift] key and press [F1] . The mouse poi nter looks I ike this

o

To find out what a

2

C l ick the tool .

particular tool does

If you are new to Microsoft Office applications or to the Windows interface, there will be many things on your screen that puzzle you at first. There may be strange looking tools on the toolbars; items listed in the menus may suggest things you've never heard of and other obj ects that appear and disappear as you work may add to your confusion! Don't panic! If you don't know what it is - ask!

or

o

3 4

To find out about an item in a menu l ist

Cl ick on a tool

•Spelling (TOOls menu)

Open the menu l ist by c l icking on the menu name.

Hel p on Spe l l ing tool

C l ick on the option requi red on the men u .

Open a menu

or

o

5

Checks the spelling &ftext entries in table, query, or form Datasheet vieWor selected teld in a teld bOll in Form view.

To find out about

Sel ect an option

anything else within the appl ication window

AutoCorrect(TOOls menu)

Customizes the setiings used to automatically eorrectteld as you t)lpe, and creates and modifies the list of words to correct as you type.

Just cl ick on it.

He l p on AutoCorrect Hel p on the New button New button

Creates a database object Before clicking this button, click the tab for the twe of database object you wantto create_

1S

Screenlips

Basic steps

If you point to any tool on a displayed tool bar, a ScreenTip appears to describe the function of the tool.

0

If you like using keyboard shortcuts , you can customise the Screen Tips to display the shortcut as well. This will help you learn the shortcuts quickly.

You can have large Go to Options

Sc reen T i ps

Poi nt to any tool bar that is displayed and c l ick the right mouse

2 3

keys are displayed

icons if they wi l l help

1

To customise the

4 5 6

button . C hoose Customize . . . from the shortcut men u . Select the Options tab in the Customize d i a l og box . Sel ect the Show shortcut keys in ScreenTi ps option .

C l i ck C lose. Point to a tool on the toolbar - if it has a

shortcut key it wi I I be displayed with the screen t i p .

I1

I

i l

!

1. Switch on Shortcut keys

C l ick C l ose

1 I Takenore

Ii

I

�- ----- -------

16

J1

you've md prevlOU! vercloot of throush Weloome s Acceas, take took to Microsoft Acuu 97Wlaat'a New Help._ tab in

If

1 ���Contents II

l

the.oa-Jine •

1

The Help menu

Basic steps

1

Open th� Hel p menu and choose Contents

2 3

and I ndex.

At the Help Topics dialog box, select the Contents tab .

Select a book and cl ick You may see

The Help system can also be accessed through the Help menu. Almost everything you'll ever need to know will be somewhere in these Help pages . The Help pages can be located from the Contents , Index or Find tabs.

Contents tab The Contents tab is a good place to 'browse'. Look through the topics and explore any that appeal to you.

more books, a l ist of

Use Hel p - Contents and I ndex

topics, or both . Open

4 5

6

the books as needed .

it and cl ick



G o t o Contents

Work through the Hel p system unt i l you find the hel p you need . Close the Help system .

Doubl� eUokon a book

.

C l os e

To open a topic, select

to

openit. Double eliok ont

topic to dlspfty Us oot�tenu.

Display a topic This button switches between Open, Close and Display as appropriate

17

Index tab

Basic steps

The Index tab gives you quick access to any topic and is particularly useful if you know what you are looking for!

1 2

Go to I ndex Start to type a word

3

4 5

6

Open the Index tab . Start typing the word you ' re l ooking for . Sel ect an i ndex entry from the l ist . Cl ick

wi l l see a l ist of topics or a Hel p page. Conti nue unt i l you f i nd the hel p you need . C l ose the Hel p system .

Select an entry C l ick D i splay

Options i n c l ude one to print the topic

Go to the Hel p Top ics d i a l og box AI AI :.!tl .!0 .Jtl AI

.Jtl AI AI Jd

18

What area do you want t o read about? Improving performance

Working with other applications Working with the sample applications Working in the Database window menu bars. and toolbars, Using and customizing shortcut menus Worki ng with data Working with tillers Printing and previewing Designing a database

You

Working on the Internet or an Intranet

the req u i red He l p

Basic steps

1 2

B� R

Select the Find tab . Type in your word (or part of it - enough to get some matching

3

4 5 6

find tab The first time you use the Find tab, the Find Setup Wizard runs to set up your word list - j ust follow the prompts . Use the Find tab to search out specific words and phrases, rather than look for a particular category of information.

words d i s p l ayed) . Sel ect a matching word

Go to Find

Start to type a word

to narrow the search. Choose a topic.

C l ose the Hel p when you are done .

C l ick D i s p l ay

1 Open the table in QJ�lll'?.QR�I.YJirti·

2 Click the fil'!ii.?Ji!l�t;t,:;tof the column vou wantto delete.

3 On the Edit menu, clicK Delete ColUmn. Notes • If other lii>I'i!l:!§!$.?Jl.ifjJ'itt;:;contain references to a deleted field, you need to delete those references as 1'/ell. For example, if a report includes a t9nl!P.I,bound to a field that has been deleted, Microsoft Access wont be able to lind the data from the field and will generate a message. • You cant dele te a field that's part of a r!l!�.tiRD:�l1tP. You must delete the relationship first

�---------lll I t

.

I

1 This option is not the easiest I way to get hefp if you're new to I 1 I Access. It can be difficult to 11

����'simple' things!

J

11

19

Summary o

Press [F1] or cl ick the Office Assistant tool to get hel p with your tasks .

o

What's This? [Shift]-[F1] and cl ick on a tool or menu

o

ScreenTips are useful l earning aids when you start out

o

Choose Contents and Index from the Hel p menu and

item to find out .

using Acces s .

browse through the on- l i ne hel p pages from the Contents tab .

o

Search for specific categories of i nformation from the

o

Locate hel p on specific words usi ng the Find tab.

I ndex tab .

20

3 Building a database Creating a new database

................................22

Creating a new t a b l e .......................................... 24 Table Design window .......................................... 26 Text data t y p e ........................................................... 28 Primary key .............................................................. 29 Saving the design

.................................................30

Closing a database................................................ 31 Summary

....................................................... 32

Creating a new database The first thing we have to do is create a database for our data, and give the database a suitable name.

C hoose B l a n k Database

C l ick OK

Select the fol der

C l ick Create

Basic steps o

1

On starting Access

2

d i a l og box .

0

3

C hoose Blank Database at the Microsoft Access Cl ick From within Access

Open the File menu

IJ.

and choose New

4

Database or cl ick

5 6

and cl ick

C hoose Blank Database from the General Tab

Select the fol der . At the File New Database, enter a File name. Here it is cal led

7 8 Enter a name

22

Leave as Database

Holiday Properties.

Leave the Save as type: field at Microsoft Access Databases .

Cl ick

The project The next sections describe a proj ect that you may like to work through. It demonstrates many of the Access features you need to get to grips with.

1r,1 Jake :--il � l I I The Database window II has its own toolbar. If

'I !

t

!

I I



youare used to Windows

95 apt>lications, some of

Jl 1

used Acceu

functions, and many of ..

Your clients will contact you with details of: e •





I 1 ! the tools willbe familiar. I ! They provide shortcutsto

I ! regularfy j'I ft

You have set up a travel service that has an extens ive database of quality accommodation.

I 1

��ook. Jj them will be introduced

You can then interrogate your database to get a list of properties that match their requirements and check prices. If a client decides to make a booking, you can get the name, address and telephone number of the property's owners, and contact them to arrange the let. Your Holiday Database will consist of four tables : • • • •

New database

Print

where they want to go; when they want to go; how many people need to be accommodated; what kind of board, e.g. self-catering, is required.

Format

Type of Accommodation eg cottage, flat, apartment or room; Accommodation details, e.g. location, number of beds, whether it has a garden/pool/maid service; one withPrice details ; one with details of the property owner or Contact. i cons

Re l at i o n shi ps

Spel l i ng

obj ect Pri nt previ ew

C o py

icons

Propert i es

23

Creating a new table

Basic steps

The data you store will be held in a table (or tables) . A table consists of:

1



the record structure, that is , the field names , data types,dDescriptions and field properties;

and •

the record detail, for example, accommodation details , price details , contact details.

Give careful consideration to your table structure. It can be edited (you can add fields , delete fields and change the field properties) at a later stage, but things are a lot easier if you get it right to begin with.

what fields you require in your table;



which field will be your key field- one that uniquely identifies the record , e.g. property code, product code, employeer reference number.

Once you've worked out the structure, you can then create your table.

--.

1

! Takenote II ¥0eslgn/Form/Datasheet Viewtoot _

to changefrom oneview to theother. When

enteringdata� you can switch freely between ForM and J>atasheet Views.The

sametabU�.

data will all besaved in the

Chap:tertOfor more �nformatlon on form design. '

See

73

Summary o

To open a table i n Datasheet view, select the Tables tab on the Database wi ndow, then double c l ick the tab l e name .

o

If the data you enter violates a Validation rule, an error mesage is displayed .

o

To move between fields in your datasheet use [Tab] or

o

To move between records use the arrows on the left

[Shift]-[Tab], the mouse or the keyboard shortcuts .

of the status bar, or the scrol l bars and the mouse, or the keyboard shortcuts .

o

To go to a specific record press [FS], key in the record

o

The contents of a field can be edited, replaced or

o

number and press [Enter] .

deleted during i nitial data entry or at any later time. The val ues in a Lookup field are displayed in a drop­

o

down l ist . To complete an OLE Object field, choose Object . . . from the Insert menu and l ocate the object required .

o

Hyperl ink fields can contain a path to a file or an

o

To display your records in a form layout, c l ick the

o

I nternet address .

Autoform tool on the toolbar.

To change your view use the View tool on the toolbar.

o

To add a record to your table, cl ick the New Record

o

To delete a record, select it, then press [Delete] .

74

tool on the tool bar, then key in the detai l .

· ··a#dthtt ·• �tlta< ·ln;:·:J)u{ · App•ndi�to4Jlf(JUr:fatifes · beforactnatt�lit•si�' · •· · .. ·

i;|s

Resigning a table --------------------------------------A d d in g a f i e l d ....................................................... . . . 7 6 D e le tin g a f i e l d ................................................... . . . C h a n g in g fie ld p r o p e r t i e s ......................

78

....19

P rim a ry k e y and i n d e x e s .......................... . . . 8 0 S u m m a ry |

................................................................... . . . 8 2

Adding a field

Basic steps

New fields can easily b e added t o an existing table. Try adding two fields to the Accommodation table. e •



Town has the Text data type, and will fit above Country, Star Ratingwill go above Contact/D. This field should have the Number data type and an Integer format. Add a Validation Rule set to accept only a 1 or 2 or 3 or 4 (our star rating system) . If you are working through the project make up some Town and Star Ratingdetails .

1

At the Database wi ndow, sel ect the Tab l e whose des ign you want to edit.

2Cl ick 3 Select

�=

the row (field)

that you want to have

4

below the new one .

81 -

Cl ick the Insert Rows tool

A new field is

added above the Select the table

5 6

7

C l i c k Des i g n

11:I =��-=� fi I 11

To add a field at the

end of vour field list, stmrlv scroll down to the first emrty

and key the in details required. jL'-:::==:' -=---'

row1

76

j

--===-· �

8

9

sel ected one . Def i ne the field name, data type, descr i ption, and field properties . Add other fields as req u i red . Save the changes cl ick the Save tool Respond to the Data I ntegrity Rules prompt .

C l ose the Design wi ndow by cl icking its C l ose button .

I

1

1

C l ose the Des ign wi ndow

Select the row below

lf:you ad� Vafi��til)J'l Rufes{see page 40 toa new lleld, this prompt appean when you try to save the new dedgn

. Witha newfietd, which �l)ntairtt no datatclick



II you have changed the properties of an e�isth•t fiel1d

{withdata in it) click i nil11

data a gainst to leave it unchecked. to checkthe

77

Deleting a field Redundant fields are j ust as eas ily removed. Any data held within a field that you delete is permanently erased - so be careful with this one! •

E� 0�

Basic steps

Before deleting a field, go into Datasheet View. If the field contains information in any record , think carefully and be sure it is okay to delete.

1

2

3

4

Select the row

0

(j

Select the row (field) you want to delete .

�-

Cl ick the Delete Rows tool

Confi rm the deletion at the prompt . If an Index wi l l also be deleted, you wi l l be prompted to conf i rm the deletion aga i n .

Tip

If you delete

field a

ohange Its properties�

or

then change your mind,

close the ta ble without

the changes. Conf i rm the deletion saving When you reopen it, the

(and Its contents) will still be there. field

Conf i rm aga 1 n

78

Basic steps

1 2

3

4 0

5

6

Select a Currency

E� 0� 0 IJ

field .

Press [F6] to move to the lower pane .

Changing field properties Field properties can also be modified as required. In the Price table, we can change the field properties of the fields with a Currency data type to show 0 decimal places .

Open the Decimal

Select the field

Places l i st and change

the property to 0 . Repeat for al l fields . Moving fields

In Design View, cl ick in

Reset the

the sel ector bar .

pro perty

With the pointer in the sel ector bar area, drag and drop the field into

7

its new position . Save the changes and close the window .

Moving fields You can change the order of your fields in either Design or Datasheet View.

Take note

In Datacheef View, you can move a field by dragging the lfeld ·name at th(J topof the eolumn.

79

Primary key andindexes

Basic steps

You may decide that the field that you originally set as your Primary Key is no longer appropriate.

1

• •

Changing the primary key is simply a case of setting a new one (see page 29) ; Removing the primary keywithout setting a new one is also very easy. The primary key tool is a toggle ­ it switches the status on and off. Select the field that currently has primary key status and click the Primary Key tool. (Set your primary key again if necessary.)

2

3

1/Fil

I n Design View, c l ick the Indexes tool

A l ist of the indexed fields is displayed . Cl ick the Indexes tool again to close the dialog box (or cl ick its C l ose button) .

You can display a list of the fields that you have indexed in your table. This gives you a quick check on what has and hasn't been indexed. C l ose when done

List of i ndexed fields

Take note

Viewing the Indexes dialog box can be urefufto let rou check a rit' lot what fieldr have and have not been indexed quicker then checking each field individuallr in l>erign Vtew. -

80

Basic steps

1 2 3

4 5

6 7

�� R

Open the A ccommoda tion ta b l e

i n Des ign View. Move the i nsertion point to the Town fiel d . Press [F6] to go to the l ower pane.

Adjusting indexes Fields can be indexed at the initial design stage, or during a later edit of the design. You should index those fields you will want to sort on or search on, as it speeds up sorting and searching. In the Accommodation table, we could index the Town and Star Ratingfields, so we could to sort accommodation into town order, or search for accommodation in certain towns or with specific star ratings .

Set the Indexed field to

Cl ick in field

Yes (Duplicates OK).

C l o se

Do the same with the Star Rating fiel d .

Save the changes . C l ose the tabl e .

Set Index option

New l ist of i ndexed fields

81

Summary o

To add a field in the middle of your table, select the field that wi l l be below your new field and cl ick the Insert Rows tool on the Toolbar.

o

To add a field to the end of your field l ist, scrol l down

o

To delete a field, select the row, make sure that it is

to the end of the l ist and key in the new field deta i l s .

the right one and you rea lly don't want it, then cl ick the Delete Rows tool on the toolbar.

o

Field Properties are easily changed - select the field

whose properties are to be changed, press [F6] to move to the lower pane, make the changes, then press [F6] to return to the upper pane .

o o o

The order or fields can be rearranged in either Design or Datasheet View . To change the primary key, simply set a new one as req u i red . To remove the primary key status from a field, and not set another field as the primary key, select the current pri mary key field, then cl ick the primary key tool to switch the status off .

o o

82

Fields that are l ikely to be sorted or searched on shou l d be indexed . Remember to save your edited Design .

..............f {,|;

B ill

Il ili li 1!

8 Datasheet display Gridlines. . . . . . . . . . . . . . . . . . . . . . . .

t. , V.

If; 111111111Ii H | l iilil ii | \ lliii ll §] =i 111111111 ll i .

:t-

84

Hiding c o lu m n s. . . . . . . . . . . . . . . . . . i 85 Showing colum ns. . . . . . . . . . . . . . . . . ; 86

.? :.»S i l¥



ll] l ;i

ItW m w w m ii l

f o n t s . . . . . . . . . . . . . . . . . . . . . . . . . . . ; . 87 Widths and heights. . . . . . . . . . . . . . .

i

88

Freezing columns . . . . . . . . . . . . . . .

j

89

Print Preview . . . . . . . . . . . . . . . . . . .

i

90

$: it; ■-i

■ | i iiiiiiiiii; ■ 111 :! : J -, 1 1,

il=f .

1 :t

Page Setup . . . . . . . . . . . . . . . . . . . . . . i 92

■■§

:! ■ ■ if lllllllll|

Printing your table . . . . . . . . . . . . . . ..... 93 Summary . . . . . . . . . . . . . . . . . . . . . . . . 94

1

f_ J

Gridlines

Basic steps

1

So far, we have been content with the way our tables appear on the screen. However, depending on the number of fields in your table, and what you want to look at, you may need to change the format of your datasheet. You can also print data from your table in Datasheet View, so you might want to consider customising the datasheet format before you print (see page 93) . By default, the gridlines are displayed between the rows and columns of your table. Most of the time this is what you want, but, particularly if you are going to print your table in Datasheet View, you might prefer to switch them off. Viewing and hiding gridlines is an on/ off toggle - you switch them on and off usingthe same command sequence. It is assumed the gridlines are displayed at this stage. Open the Format menu

Set the options

0� 0

Ci

Open the Format

2 3

men u .

4

req u i red .

C l ick Cel ls . . . Complete the Cel ls Effects dialog box as

Cl ick

Il 1 Jake note

r---ia]! I I j

If you make the Gridflne

colour the came

�--

I

I

1 background colour, your �dUnes: 'hidden'. [

Sel ect Cel l s . . .

E�

at the

are

C l ick OK

Check the effect 1n

84

I

�iding columns

Basic steps

1

Select one column

You may not want all the columns in your table t o be visible. You may be concentrating on ataskthat only uses certain fields and decide to hide the ones that are of no concern at the moment, or you might want to print out only certain columns from your datasheet.

by

cl icking in the Field Name row .

or

Select a set of adjacent columns by d ragg i n g

col umn(s)

al ong the f i e l d name

2

row . C hoose Hide Col umns

Room

Cottage

from the Format men u .

Flat

Cottage Room

2

4

Cottage

. cottage

6

Apar1menl

� II � Jl also hide columns j l

r----���-...,�--..----�._...-. -----� !

I f Takt note I

1�1 11

Youcan

.

I

I

l

left� untlf the field

11 !� to the left of the fine 1 disappears. Columnsthat I

I

l

appear hiddenthis way may

'thowing' in the Show Columns dialog box. register

4

4

.

You mu;dhide the cofumn

completely to give 'hidden• status.

it

Use Format -

I

by dragging the vertical names

4



I I line between the field .

Ffal

Hide Col umns

1 I

1

I I

I

I

1

flat

3

Room

Cottage

2

4

3

flat

6

ROOtTI

-. A

Cottage

Cottage

l

4

4

2

4

Cottage

6

1

4

2

4

Apartment Flat

4

Apartment

4

flat

1

4

• f»l•.!l.�.� 6

3

4

3

2

3

4

En�sude faciliies

5 6

7

6 8 8

3

.1 Located in cenln oft CYp Ga

10

8S

Showing columns

Basic steps

I f you have hidden some columns , there will come a time when you need to show them again. The easiest way to reveal hidden columns is to use the Unhide Columns command in the Format menu.

1 0

Open the Format menu and choose Unhide Col umns .

The Unhide columns d i a l og box appears . The columns currently

Use Format -

showing have a tick

Unhide Col umns

bes ide them .

I

Scrol l through the ist

2

Scro l l up and down the list to locate the field name you want if

C l ose

3

necessary . Togg l e the Show/Hide status by selecting the fields you wish to show, or desel ecting

4

those you wish to hide. When you have specified what fields to show, and which to hide, cl ick

Tick to show, clear to hide

I1 Take nofe

[ You can 'show' hidden columns: using the el1ek end drag method, I

86

but

it can

Locating the column border in thefiefd11ame ttiekyf be

row (where one border overlays another when columns arehlddeo}

can be a frustrating exercise using the mouse!

fonts

Basic steps

1

Choose Font . . . from

2

the Format men u .

I n the Font dialog box, select the font size and style. The Sample area shows the effect your

The default character style (font) is Arial, 1 0 point. You may want to change the font style or size if you are formatting your datasheet with a view to printing it. You might want to use a larger font, or make the print bold for example. You can change the font style and/ or size by using the Font dialog box.

selections wi l l have on

3

Choose Format - Font . . .

the characters . to

Cl ick

return to the datasheet

with your new settings. Set the font, style and size . l .

C l ick OK

, l! ·� . . L. 1 1. t:n���> ,

>'

. . . . ltg, th�ftllf ... . •attllblf�J� ::· �t�lr · .· irs · tlttttt�:f4r\tht wJtols. ih• · .·.:�at�thte� :tJtt . cdfUtrt$��:·tY',ttiEt)fou· selected.

,

.

••

have

l�lf, ..



.

Check the appearance in the Sample box

87

Widths and heights

Basic steps

The column widths are initially determined by the field size or the field name size that appears at the top of each column . You can change the displayed width when in Datasheet View. Width is measured in characters. You can change the row height for all the records in your datasheet. You may wish to do this if you want to see more records on your screen at one time. Height is measured in points, the same as font sizes .

o

1 2

3

C hoose Column Width from the Format men u . Set the requi red width, or sel ect the Standard

4Cl ick 5

C l ick OK

Select the col umn(s) .

Width box .

o

Use Format - Col umn Width

Setti ng Column Width

6 7

===

Setti ng Row Height

C hoose Row Height from the Format men u . Set the height, or sel ect the Standard Hei ght box . C l ick

Set the height

C l ick OK

1[ rakuofe

r·rr=����������������

You can also change the row hetghthy dragging

bat between the tow selectors (down the Jeft

!' I j I lose _j I

horizontal e th each side of

you appear to your reeord>. IF you reduce it so far that l recordst increase lt through the Row Hettht dialot box. --

88

--�

-

freezing columns

Basic steps

1 2 3

There will b e times that you need t o view columns, which are distant from each other in your table, on the screen at the same time. This can be done by hiding (see page 85) or by freezing columns at the left side ofyour table. Theywill remain in position while the other columns can be scrolled in and out of sight. If gridlines are not displayed, a thick line appears to the right of the frozen columns .

Sel ect the col umn(s) . Choose Freeze Col umns from the Format men u .

The col umn(s) are moved, if necessary, and frozen at the left of the table.

0

4

Main Street 22 St Stephen Street 1 4 Mill Wynd West GLASGOVV 1 4 Worthington Way BIRMINGHAM

To unfreeze col umns

Choose Unfreeze A l l

Road St Stephens Manse 328 Bath Road Lang Strasse

Col umns from the

10 Dolphin

Format men u .

BERLIN

PETERLEE LONDON

ILFORD

Essex

DEREFORD

Norfolk

KH.JDAL

Sel ect t he col umn(s)

Use Format Freeze C o l u mns

C ol umns frozen

r.-�-----__,--= 1I 1 l

!

Take note

I

Columns that have been frozen, remainat the left .

ll

ll

.

11 11 l

Jl I

edte when unfrozen. l ,�---·----·--___j I

_, ___

2 Elaine 3 Elizabeth 4 Gordon

6 Andrew 7 Alice 8 Brian 5 Hanz

4 1 665 1 043 01 4 1 510 5103 21 557 9321 0121 676 1 999 49 30 1 2 1 0049 30 435 81 475 101 0 0171 442 4 1 02 .91 575 3928 0191' V653 1 843 • ' A 81 543 6758 0171 554 1 234 331 1 1 2 01 362 574098

__J

The thick l i ne marks the edge of the frozen col umns

89

Print Previ ew

Basic steps

Now that you have some data in your table (s ) , you will most likely want to print it out at some stage. There are various ways of doing this , but an easy way to begin with is to print from Datasheet View.

1

Once the datasheet display has been formatted to your satisfaction, you can print the table.

2 3

Do a Print Preview first and check that the layout is okay on screen, before you commit it to paper.

o

Open the table you want to pri nt in Datas heet View . Format i t a s requi red .

g.

Cl ick the Print Preview tool

Your table is displayed in the Print Preview scree n .

lake note II you

you wish printing;

Previ.ew clicking

Print Preview toolbar Database w i n dow

see something that

edit before to

cfo�e the Print

screenby on

the Print Preview toolbar..

You will be returned to

Datasheet View

you can

Two page Screen displays

90

C l ose prev1 ew

edit.

where

Basic steps

1

�€J

Move your mouse

poi nter (it shou ld look l i ke a magn ifying glass) over the area of the table you want to

2

3

zoom in on . Cl ick the left mouse butto n . You are zoomed in, so

4

you can read the data .

5

the table into view.

Zoom In Print Preview, it is very difficult (if not impossible) to read the data being displayed. This is not usually a problem, as you are really j ust checking the pres entation of the data, not the detail. However, if you want to check an entry, you can zoom in to get a better look! You cannot edit the data from the Print Preview screen ­ if you notice something is inaccurate or you want to change the formatting of the table, you must close Print Preview and return to the datasheet to make the changes. Zoomed in on the table

Use the scrol l bars to bring other areas of

Cl ick the left mouse button aga i n to zoom out .

o

The Zoom tool on the Print Preview tool bar acts as a zoom in/zoom out toggle too .

I

II !

Tip

·---��·

The mouse click and the

tool

I I For bettercontrolof the magnification, I Luse the Zoom level drop-down list. ==�===-=�-toggle between close Ui' and lull page.

lli_==

Scrol l to see other parts

I

Jl

11

_j

91

Page Setup

Basic steps

If you need to change the margins or orientation of your page, use the Page Setup dialog boxto make the necessary changes . You can move to the Page Setup dialog box from the Print Preview screen or from Datasheet View. Open the F i l e menu

1 2 3 4

Open the File menu. Sel ect Page Setup. Com p l ete the Page Setup dialog box as

req u i red .

C l ickI

C hoose Page Setup

re q u i red

Take note

C l ick OK

92

.$.

the Page I variesI

The content of Setup dialog box

�� printer to prin�J

Printing your table

Basic steps

1

If the table is formatted and the Page Setup is okay, you can go ahead and print your table. You can print directly from Datasheet View, or from the Print Preview screen. It does not matter whether you are in Datasheet Vview or the Print Preview screen, the routine is the same.

If you want to print certa i n records, sel ect

2

3

4

them now . Choose Print from the F i l e men u .

Compl ete the Print dialog box as required . Use File - Print

Cl ick

It

1

[ Take note

: To tend 1your tobfe 1 11 directly to ithe printer� I 1: uting default print cliCk the Print 1

the j1 ::ngt,

Com p l ete as requ i red

�=----�-lip

[, Multiple copifs are printed qul.cket fl uncollated �.e. aft page1s t�en oil r page 2sl etc, butyou will have to

Lcollate them by hand -

tater.

C l ick OK

.

--··-·----·-------

93

Summary o o

The Gridlines can b e changed from the Cel ls Effects d i a l og box . To hide columns, select the columns you want to hide then choose Format - H ide Col umns .

o

To show hidden columns, choose Format - Unhide

o

To change the font used i n your datasheet, choose

o

To change the width of columns choose Format -

o

To customise the row height, choose Format - Row

o

Columns and complete the dialog box as required .

Format - Font and select from the options .

Column Width, and set the width in the dialog box .

Height and spec ify the required height . To stop columns scrol l ing off the screen, select them and choose Format - Freeze Col umns .

o

To unfreeze your columns, choose Format - Unfreeze

o

To preview your datasheet before printing, c l ick the

o

To check details on the Print Preview screen, zoom in

o

To change the margins, paper size or orientation of

o

To print your datasheet, cl ick the Print tool on the

Al l Col umns .

Print Preview tool on the toolbar.

and out as required .

the paper, go i nto Page Setup.

Datasheet tool bar or on the Pri nt Preview tool bar.

94

9 Soiling and searching f in d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 filter By Selection . . . . . . . . . . . . . . . . . 97 filter By fo r m . . . . . . . . . . . . . . . . . . . . . 98 S o r t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Multi-level sorts. . . . . . . . . . . . . . . . . . 100 Multi-table queries . . . . . . . . . . . . . . . 101 Setting the query criteria . . . . . . . . . . 103 Reusing queries. . . . . . . . . . . . . . . . . . . 105 fditing a q u e ry . . . . . . . . . . . . . . . . . . . 106 Query Wizard . . . . . . . . . . . . . . . . . . . . 107 Summary . . . . . . . . . . . . . . . . . . . . . . . . 110

find

Basic steps

With larger databases , it is impractical to locate records by scrolling through, reading each row. Instead, you can use the Find command, which will locate records that contain a specified item of text. Find works most efficiently if you know what field the data is in (so you don't need to search the whole table) , and the field is indexed. Enter target data Search Al l , Up or Down? Start the search

1

If you know what field the data is in, position the i nsertion point i n the field column i n Datasheet View before

2 3

4

you start . Cl ick the Find tool

•.

Key the target data in the Find What: area .

I n Search: spec ify whether to search the whole table, or up or down from the current

5 C l o se

field to match

further You can search i n a l l fields if needed

6

7

record . I n Match: i n d icate where the data appears 1n the fiel d . to start the search . Cl ick

after

you have found one and want the next

Tip

When

8 the Flttcl dialog box appeart1 drag on

title bar to mo"e it so itt

obscure the data 96

it not thatdoes

vou are working with.

matc h .

Cl ick (f£111111

when

you have found what you want.

fi Iter By Selection

Basic steps

1

Select the text you want to base your filter on, e . g . ' Scotland' i n

2 D

3

the Country fiel d .

criteria

��l

Cl ick the Filter By Selection tool

Records matc h i n g the selection are displayed . Repeat the process if you want a sub-set of your new l ist, e . g . only

4

When working within a table, you might want to display a subset of the records held based on some criteria, e.g. all the properties in Scotland. You can use Filter By Selection techniques for this.

01 102197 1 8101 197

COI'k

1 011 2197' Inverness ' ' Paris Berlin

Dusseldorf

"""""'

Ireland

Scotland France

Germany

c sc

sc

sc

HB

B

B D

!'.

A B

Room

Cottage

Cottage , . fll:it

sel f-cater i ng propert ies .

111 to

C l ick the Remove Filter tool

display a l l

Display after first l evel of filtering

your records aga i n .

97

fi Iter By form

Basic steps

As an alternative to using Filter By Selection, you could use Filter By Form. Using Filter By Form, you can specify multiple criteria at the same time, rather than one at a time, e.g. 'England' in Coun try and 'SC' in Board. You can also set alternative criteria, using the Or tab . If 'Scotland' in Coun try was selected here, the filter would pick up properties in either country. Set criteria

1 o

[j].

Cl ick the Filter By Form tool

As you move from field to field, you wi l l notice that each becomes a Combo type box, with

2

a drop-down arrow .

3

drop-down l i sts .

Sel ect the criteria requ i red from the

Switch to the Or tab and set options here if al ternat ives are

4 Set a l ternat ives?

wanted .

�J

Cl ick the Apply Filter tool

Sel f-cater i n g 1n England

Self-cateri ng in England or

Sel f-catering 1 n Scot land

98

Sort

Basic steps

1 2

Open the table you want to sort (in our case A ccommodation) . Put the insertion poi nt anywhere i n the field you want to sort your

3 o

records on .

When you key records into your table, they appear in the order they were input, or that of the primary key if one is set. There will be times when you need the records in a different order, ascending or descending, using some other field in the table. For example, in the Accommodation table, you might decide to rearrange, or sort, your records into Coun try, Town or Star Rating order . Sorting your records on one field is very easy. We could use the Accommodation table to try this out.

Cl ick the too l . The records are sorted

Open the table

in Ascending or Cl ick in the field you wish to sort on

Descen d i n g order, as sel ected .

sc

c

8

BB sc

SC

You can be •nywhete,in ', . any row, in ''" llefd you want to

······

sqrt on.

The ,

wholettblewillbecorted.. inascendln.ordescend• , ingorder oq thedata tn : thalftetd.

SC

.He sc

sc H6

8

.

D

.fl.

A 8

Collage _ Room Fl

=

>=

setting criteria you more than equal to

more

These >

"H"

104

are

than

or

can