"Access 2003
Beginner’s Guide
Contents
Overview......................................................................................................................... 3 Access Basics.................................................................................................................. 4 Database Window ....................................................................................................... 4 Opening a Sample Database ....................................................................................... 4 The Menu Bar ............................................................................................................. 6 Toolbars ...................................................................................................................... 7 The Objects Bar .......................................................................................................... 9 Help........................................................................................................................... 11 Closing a Database.................................................................................................... 12 Quitting Access......................................................................................................... 12 Creating Databases and Tables ..................................................................................... 13 Creating a Database from a Template....................................................................... 14 Creating a New Blank Database ............................................................................... 19 Opening an Existing Database .................................................................................. 20 Creating a Table Using a Wizard.............................................................................. 21 Creating a Database Table from Scratch .................................................................. 24 Displaying a Table in Design View .......................................................................... 27 Adding a New Field .................................................................................................. 28 Changing a Field Name ............................................................................................ 28 Setting a Field's Data Type ....................................................................................... 29 Setting the Field Size for a Text Field ...................................................................... 30 Setting the Field Size for a Number Field ................................................................ 31 Adding a Field Description....................................................................................... 33 Deleting a Field......................................................................................................... 33 Setting the Primary Key............................................................................................ 34 Saving the Data Table............................................................................................... 35
2
Overview
Microsoft Access is a database program that enables you to store information such as a client list, product list, music libraries, and other collections of data. In addition to entering the data in a database table, you have several tools for working with the data. You can create forms for simpler data entry. You can create a query to display a set of records (all customers with overdue balances, for instance). You can create a report. All these elements are Access objects and are stored together in the database. A database is a collection of information that's related to a particular subject or purpose, such as tracking customer orders or maintaining a music collection. If your database isn't stored on a computer, or only parts of it are, you may be tracking information from a variety of sources that you have to coordinate and organise yourself. For example, suppose the phone numbers of your suppliers are stored in various locations: in a card file containing supplier phone numbers, in product information files in a file cabinet, and in a spreadsheet containing order information. If a supplier's phone number changes, you might have to update that information in all three places. In a database, however, you only have to update that information in one place, and the supplier's phone number is automatically updated wherever you use it in the database. One useful point to understand about Access is that you can work in two views for most objects: Design view and Working view. Think of Design view as viewing the technical drawings of a house, whereas Working view is the house itself. In Design view, you can see how the underlying structure creates that object, and you can make changes to the layout. In Working view, you can view and work with your data using the structure you created in Design view. Working view varies depending on the object type. For instance, when working with tables, the view is called Datasheet view. When working with queries, you see the results of the query. Each element in a database table is called a field and has a field name and data type. One set of fields is a record. Although you can make modifications to a database design after you've entered records, you may lose data or encounter a few problems. Therefore, it's a good idea to carefully think about and plan your database structure. Which fields are needed? How do the fields relate? Do I need to break down a field into smaller elements? For instance, it's not a good idea to include one field for a person's name. Instead, include a first name field and a last name field. This setup makes sorting and searching easier. When you are entering data, you do not need to save your work. Access saves the work automatically. When you create or modify an object such as a database table, form, or report, you do need to save your changes. Rather than store all your data in one large database table, you can break down the information into separate tables and then set up relationships between the tables. For instance, rather than have a table that includes products, orders, and customer names, you can include separate tables for each and then link them.
3
Access Basics
To use Access you’ll need to learn the basics of how the screen looks. If you’ve used other Microsoft Office products before you will notice some similar toolbars and menus. There are however many unique options that only appear within Access and if you’ve never used Access before it can be a bit daunting the first time you load the program to know what to do next. Microsoft includes a sample database called Northwind, that will give you an idea of how a database works, as well as seeing how to use tables, queries, forms, and reports.
Database Window
Help command
Tables button
Access toolbar
Objects toolbar
Tables toolbar
Access program window
Database window
Figure 1
Status bar
An overview of the database window within Access 2003
Opening a Sample Database
1. To open a sample database, begin by clicking on the Help menu. 2. Move the mouse to the Sample Databases option, and click on Northwind Sample Database (as shown in Figure 1). Figure 2
Access the Sample Databases by clicking on the Help menu
4
3. The Northwind database opening screen appears; click OK to close this screen and display the Northwind database. Figure 3
The Northwind database opening screen appears when opening the database. To prevent this from appearing again click on the ‘Don’t show this screen again’ option
4. The Main Switchboard dialog box opens. Click the Close button in the upper-right corner of the dialog box to close it (as shown in Figure 4). Figure 4
The main switchboard of the Northwind database which is a well designed and easy to use screen, especially if you’re new to using Access
5. The database window for the Northwind sample database opens. The next pages show you how to navigate around Access by using this sample database.
5
Figure 5
This is a typical database window where you can access the Tables, Queries, Reports and so on
The Menu Bar
Click the View option in the menu bar and then select Database Objects. A submenu appears, listing additional commands. Click any of these commands to select them. If you wish to exit, click the Esc key. Figure 6
Click on the menu bar to access any of the available options. In this example we are viewing the available database objects
6
Click the File option in the menu bar and then select Open. The Open dialog box opens (as shown in Figure 7). Here you can select the folder that contains the file you want to open, and then the file. Click Cancel to close the dialog box without opening a file. Figure 7
The Open dialog box where you can browse your hard disk or network for available databases that you can open
Toolbars
In addition to selecting commands from menus, you can perform common actions using the buttons on the toolbar. The toolbar has buttons you can click to create, delete and change how objects are viewed. You can use the toolbar buttons to configure the way you view your database objects. For example, to change how objects are displayed in the database window, click the Large Icons button to view the table list entries as large icons (as shown in Figure 8). Figure 8
You can change the way Access shows your objects. In this example they are being shown as Large Icons
7
Click the Small Icons button, located next to the Large Icons button, to view the table list entries as small icons (as shown in Figure 9). Figure 9
You can change the way Access shows your objects. In this example they are being shown as Small Icons
Click the List button, next to the Small Icons button, to view the table entries in a simple list format (as shown in Figure 10). Figure 10
You can change the way Access shows your objects. In this example they are being shown as the List view
Click the Display button next to the List button, to view the details of each table in the list, including its description, size, and modification date (as shown in Figure 11).
8
Figure 11
You can change the way Access shows your objects. In this example they are being shown in Details view, which is the same as List view but also has a description, modified and created date and the type of object
The Objects Bar
The Objects bar that appears on the left side of the Database window includes buttons for viewing tables, queries, forms, reports, pages, macros, and modules. These are the same as the entries that appear on the View menu as shown in Figure 6. All the options in the Objects bar represent types of objects that you can create and use in Access. Any time you want to create, view, or modify an object, you must first select that object type from the View menu or the Objects bar. To view table objects in the open database, click the Tables button on the Objects bar. A list of tables in the open database appears, as well as commands for creating new tables. Figure 12
A list of the available Tables appears and from here you can also create new tables
To open any of the listed tables, double-click its name. For instance, double-click the Categories entry to open the Categories table.
9
The Categories table opens. The names at the top of each column identify the data, and each row is a record (as shown in Figure 13). Figure 13
When opening a table you can fill in the records as required
Close the Categories table by clicking the Close button in the upper-right corner of the table window. At the bottom of the Categories table you will see a Record field. This is very helpful when you have a vast amount of entries within the table, as you can scroll through by using the buttons, or type in the record number in the number box to go straight to that entry. We’ll now see the difference by opening up a different option on the Objects bar. This time we’ll select one of the forms by clicking on Forms. A list of forms in the open database appears, as well as commands for creating new forms. To open any of the listed forms, double-click its name. For example, double-click the Customers form. Figure 14
To open any of the available forms you can either double-click on the selected form or select it and then click on Open on the toolbar
10
The Customers form is opened. To close the form, click the Close button in the upper-right corner of the form window. Figure 15
The Customers form is opened and is a visually better way of entering records
There are other options available within the Objects menu, such as Queries and Reports. You open queries and reports in the same way you do forms and tables: by clicking the Queries or Reports button in the Objects bar, and then choosing the query or report you need.
Help
Access includes an easy-to-use Help system. One way to access Help is to type a question in the help box found on the right side of the menu bar; another is to use the Help menu. The following example will use the Help feature and show you how to use this. In the help box on the menu bar, type create reports and press Enter. A Search Results task pane opens, displaying Help topics that contain the search phrase you just. Click the Create a report entry. A window containing the Help information opens. Read the information in the window, and click the Close button in the window's upper-right corner to close it. Figure 17
When you click on an option from the task pane an information window appears with help on the selected item
Figure 16
Type in what you would like help with in the help box on the menu bar and then a list of results appears below in a task pane
11
Closing a Database
When you are finished working with a database, you can close it. Doing so frees up memory for other programs you may have open. Keep in mind that you can close a database, but still keep Access open. A database window has its own Close button. To close an open database, click the Close button in the upper-right corner of the database window (as shown in Figure 18). Figure 18
To close any database window you can click on the X in the top right-hand corner
The database window and database are closed. When you close your database this is automatically saved, unlike other Microsoft Office applications that prompt you if you would like to save the changes. The only time you are prompted to save your work upon closing a database is when structural changes, such as the creation of an object, have been made to that database.
Quitting Access
To close Access, click the Close button in the upper-right corner of the program window. If you prefer to use menus, you can also exit Access by clicking on the menu and selecting Exit. File Figure 19
To quit Access click on the X in very top right-hand side of the screen
12
Creating Databases and Tables
To use Access, you start by creating a database. Within that database, you can then create tables, forms, reports, and other Access objects that help you organise your data. To help you quickly and easily create a database, Access 2003 includes several database templates, including the Asset Tracking, Event Management, and Time and Billing databases, to name a few. A database template is a pre-designed database and contains objects such as tables, reports, and queries for that type of database. If none of the templates suits your needs, you can create a new blank database from scratch. In addition to providing templates that you can use to create your database, Access 2003 also includes wizards to step you through the creation of commonly used tables. If none of the wizards will work for the type of table you want to create, you can create a blank table from scratch.
Field name Data type Field description
Primary key
Figure 20
An overview of what creating a table in design view looks like
Field size
Field properties
13
Creating a Database from a Template
Access 2003 provides numerous database templates, which you can use to create your database. These database templates are especially handy if you are trying to set up a database quickly. When you elect to create a database from a template, Access launches a wizard that walks you through the process of creating the database. The resulting database includes pre-designed tables, forms, queries, and reports. After you have set up the database with a wizard, you can modify any of the database objects as needed; these topics are covered in later parts in this book. If the New File task pane is not displayed, click on the File menu and select New. In the Templates area of the New File task pane, click the On my computer link. Figure 21
Click on the ‘On my computer’ option to select a template on your computer
The Templates dialog box opens, displaying the templates installed on your computer. Click the Databases tab (as shown in Figure 22). Figure 22
Selected the desired Database template from the available list
14
Click the template you want to use and click OK. The File New Database dialog box opens (as shown in Figure 23). Navigate to the folder in which you want to store the new database. In the File name field, type a filename for the new database. Click the Create button. Figure 23
Type in a file name in the ‘File name’ box and save the database on your computer
The Database Wizard starts; after you review what types of data the new database will contain, click the Next button. Figure 24
The Database Wizard will show you what your database will store
15
A list of the tables included in the new database appears. Click each table in the Tables in the database list to view the available fields for that table. If you are certain that your database doesn't require a particular field, click the check box next to the field in the Fields in the table list to deselect it. After you have deselected any fields you do not want to include, click Next. Figure 25
Select the fields that you would like to include in the table by ticking the boxes
The wizard presents a list of styles that affect how data in your database is displayed onscreen. Click a style to preview it. When you find one you like, click Next. Figure 26
Select the style you would like the screens to be displayed in
16
The Database Wizard prompts you to select a style for your reports (as shown in Figure 27). Click a style to preview it. When you find one you like, click Next. Figure 27
You can select from six different styles how you would like your reports to appear
Access suggests a title for the new database. If you want, type over the suggested title with one of your own. To include a picture on your reports (such as a company logo), check the Yes, I'd like to include a picture check box and then click the Picture button. Navigate to the drive and folder that contain the picture file, click the picture to select it, and click OK. When you're satisfied with the title and picture selection (if required), click Next.
Figure 22
One of the last steps is to name your database. You can also include a picture if you wish that will be displayed
17
Leave the Yes, start the database check box checked, and click Finish to create the database (as shown in Figure 29). Figure 29
Once you have selected all of the options you can have the wizard automatically start the database
The Main Switchboard window for the new database appears. You can select any of the links in the window, such as Enter/View Contacts, to continue building your database. When you use a template, Access displays the Main Switchboard that enables you to click links to perform common database tasks. Click the window's Close button to close it and use the database window instead. Figure 30
The Main Switchboard will now load and you can select the desired option from the choices available
18
Creating a New Blank Database
If none of Access 2003s templates suits your ne..."
|
You need to upgrade your Flash Player , or try to enable javascript in order see this document properly.
|
|