Lesson 1: Getting Familiar With Microsoft Access 2007 For Windows
Lesson 1: Getting Familiar With Microsoft Access 2007 For Windows
Getting Started
You use windows to interact with Access. To begin, start Access 2007. You screen will look similar to the one shown here.
Northwind is a sample database you can download from the Microsoft website. I will use the Northwind database to introduce you to Access windows. If the Northwind database is already on your system, open it, otherwise download it and then open it.
To open Northwind:
1. 2. 3. 4. Click the Microsoft Office button. A menu appears. Click Open. The Open dialog box appears. Locate the Northwind database. Click the Open button. Access opens the Northwind database.
To download Northwind, connect to the Internet and then follow these steps:
1. 2. 3. 4. 5. 6.
Click Sample. The Northwind 2007 icon appears in the center of the window. Click the Northwind icon. Click the Browse button. The File New Database window appears. Locate the folder in which you want to save the Northwind database. Click OK. The File New Database window closes. Click Create. Access creates the Northwind database and opens it.
Understanding Security
It is possible for an Access database to contain malicious code, such as a computer virus. Access has security settings that disable code and display a security warning when you open a database. If you know a database is trustworthy, you can perform the following steps to enable it. You may need to enable the Northwind database.
To enable a database:
1. 2. 3.
Click the Options button. The Microsoft Office Security Options dialog box appears. Click Enable This Content. Click OK. Access enables the content. If you are enabling the Northwind database, the Login dialog box appears.
4.
If you know a database is safe, you can store it in a trusted location. Databases stored in trusted locations do not require you to enable security.
4
9. Click OK. The location is now a trusted location. 10. Click OK again. 11. Click OK. You have created a trusted location.
to open it. The arrows change to double left-arrows to close it. The arrows change to double right-arrows
. .
In this example, the objects are organized by type, which is not the default setting. You may want to organize the objects in your database by type also. You can use the down-arrow on the top of the Navigation pane to change the manner in which objects are organized.
The Access window with the Northwind database open is shown here.
Note: Your window probably does not look exactly like the one shown. In Access 2007, the window display depends on the size of the window, the size of your monitor, and the resolution to which your monitor is set. Resolution determines how much information your computer monitor can display. If you use a low resolution, you can fit less information on your screen, but the size of your text and images are larger. If you use a high resolution, you can fit more information on your screen, but the size of the text and images are smaller. Also, you can use settings in Access 2007, Windows Vista, and Windows XP to change the color and style of your windows.
In the upper-left corner of the Access window is the Microsoft Office button. When you click the button, a menu appears. You can use the menu to create a new file, open an existing file, save a file, and perform many other tasks.
Next to the Microsoft Office button is the Quick Access toolbar. The Quick Access toolbar provides you with access to commands you frequently use. By default, Save, Undo, and Redo appear on the Quick Access toolbar. You use Save to save an object, Undo to roll back an action you have taken, and Redo to reapply an action you have rolled back.
The Title bar is located at the top in the center of the Access window. The Title bar displays the name of the database on which you are currently working.
The Ribbon
You use commands to tell Access what to do. In Access 2007, you use the Ribbon to issue commands. The Ribbon is located near the top of the Access window, below the Quick Access toolbar. At the top of the Ribbon are several tabs; clicking a tab displays related command groups. Within each group are related command buttons. You click buttons to issue commands or to access menus and dialog boxes. You may also find a dialog box launcher in the bottom-right corner of a group. When you click the dialog box launcher , a dialog box makes additional commands available.
Access Objects
To view or hide the objects on the Navigation pane:
You click the double down-arrows to view objects. The double down-arrows change to double uparrows . You click the double up-arrows to hide objects. The double up-arrows change to double downarrows .
As stated earlier, the Navigation pane stores the objects in your database: tables, queries, forms, reports, macros, and modules. Objects always display with an icon to the right. The icon tells you the object type: query, form, report, macro, and module. table,
Tables
Queries
Forms Reports
Macros Modules
Objects In Access, data is stored in tables. A table is a set of columns and rows, with each column referred to as a field. Each value in a field represents a single type of data. Each row of a table is referred to as a record. You use queries to retrieve specific data from your database and to answer questions about your data. For example, you can use a query to find the names of the employees in your database who live in a particular state. Forms give you the ability to choose the format and arrangement of fields. You can use a form to enter, edit, and display data. Reports organize or summarize your data so you can print it or view it onscreen. You often use reports when you want to analyze your data or present your data to others. Macros give you the ability to automate tasks. You can use a macro to add functionality to a form, report, or control. Like macros, modules give you the ability to automate tasks and add functionality to a form, report, or control. Macros are created by choosing from a list of macro actions, whereas modules are written in Visual Basic for Applications.
You double-click an object to open the object. You right-click an object to view a menu of options. You can use the menu to do such things as open objects, rename objects, and delete objects.
8
Objects that are open appear on tabs. Right-click a tab to view a menu of options you can perform, such as save the object, close the object, or change the view.
Change Views
A view is a way of looking at an object. For example, in Access, data is stored in tables. Two of the possible ways you can view a table are Datasheet view and Design view. You can see the data contained in a table in Datasheet view. You can see the design of a table in Design view. When you open an object, buttons appear in the lower-right corner of the Access window. You can use the View button on the Home tab to change views, or you can click the proper button in the lower-right corner of the window.
To close a database:
1. 2. Click the Microsoft Office button. A menu appears. Click Close Database. Access closes the database.
To exit Access:
1. 2. Click the Microsoft Office button. A menu appears. Click Exit Access. You exit Access.
Create a Database
When you start Access, the Getting Started With Microsoft Office Access screen appears. You can use this screen to create a database. Within a database, you can do such things as enter data, create reports, and retrieve data. You can create a blank database or you can use one of the templates provided by Microsoft. When you use a template, Access creates forms you can use to enter data, reports you can use to retrieve data, and more. You can modify the forms, reports, and other objects to suit your needs. This tutorial will teach you how. The following templates are included with Access: Assets, Contacts, Events, Faculty, Issues, Marketing Projects, Projects, Sales Pipeline, Students, and Tasks. Other templates are available online. Each template creates a database related to the title. For example, the Faculty template creates a faculty database that includes tables, queries, forms, and reports related to faculty. In Access, you use tables to store data, queries to retrieve data, forms to enter data, and reports to display data.
1. 2. 3. 4. 5. 6. 7.
Start Access. The Getting Started With Microsoft Office Access screen appears. Click Local Templates. Icons representing local templates appear in the center of the window. Click the icon for the template you want to use. Click the Browse button. The File New Database window appears. Locate the folder in which you want to store your database. Click OK. Click Create. Access creates and opens your database.
10
8.
Open the Navigation pane. Access displays the tables, queries, forms, reports and other objects related to the database you selected. You may wish to display the objects by type.
How do I create a database based on the templates that are found online? Online templates fall into the following categories: Business, Education, Personal, and Non-profit. To create a database based on one of these templates: 1. 2. 3. 4. 5. 6. 7. 8. 9. Start Access. The Getting Started With Microsoft Office Access screen appears. Make sure you are connected to the Internet. Click the category for the template you want to create. Icons representing Internet templates appear in the center of the window. Click the icon for the template you want to use to create your database. Click the Browse button . Locate the folder in which you want to store your database. Click Download. Access prompts you. Click Continue. Access downloads and opens your database. Open the Navigation pane. Access displays the tables, queries, forms, reports, and other objects related to your database.
How do I open an existing database? 1. 2. 3. 4. 5. Click the Office button. A menu appears. Click Open. Locate the folder in which you stored your database. Click the database name. Click Open. Access opens the database.
Tip: You can also open an existing database by pressing Ctrl-O and then following steps 3 through 5.
11
1. 2. 3. 4. 5. 6. 7.
Start Access. Click Blank Database. Type the name you want to give your database in the File Name field. Access will automatically append .accdb to the name. Click the Browse button. The File New Database window appears. Locate the folder in which you want to store your database. Note that the name of the file appears in the File Name field. Click OK. Click the Create button. Access creates the database and opens a datasheet with the Table Tools available to you.
What is a Datasheet?
In Access, data is stored in tables. A datasheet displays the information stored in a table in columns and rows. The columns are called fields and the rows are called records. You can use a datasheet to create a table, enter data, retrieve data, and perform other tasks.
12
Understanding Tables
A table is a set of columns and rows. Each column is called a field. Within a table, each field must be given a name and no two fields can have the same name. Each value in a field represents a single category of data. For example, a table might have three fields: Last Name, First Name, and Phone Number. The table consists of three columns: one for last name, one for first name, and one for phone number. In every row of the table, the Last Name field contains the last name, the First Name field contains the first name, and the Phone Number field contains the phone number. Each row in a table is called a record.
All of the data in a table should refer to the same subject. For example, all of the data in the Employees table should refer to employees, all of the data in the Students table should refer to students, and all of the data in the Courses table should refer to courses. You can view an Access database as a collection of related tables. For example, in a database that contains tables for Employees, Students, and Courses, the Employees table lists the employees, the Students table lists students, and the Courses table lists the courses students can take. After Access creates a blank database, it opens in Datasheet view and makes available the tools you need to create a table. Datasheet view displays a table as a set of columns and rows. When you view a blank database for the first time in Datasheet view, you see a column named ID. This column is by default the primary key field. A primary key is a field or combination of fields that uniquely identify each record in a table. No two records in a table should have the same values in every field. For example, the following should not occur in a table.
In the real world, it is possible to have two people from the same city with the same first and last name. In cases like this, you can use the ID field as the primary key field and use it to make each record unique. The ID field has a data type of AutoNumber; as a result, Access automatically creates a unique number for each record in the database. The resulting table will look like the one shown here.
13
ID 1 2
Access provides several methods for creating a table. One method is to use the Rename option with the Add New Field column label to give each column the field name you want it to have and then to type or paste your data into the table. Field names can include letters, numbers, and spaces and can be up to 64 characters long. When choosing a field name, try to keep it short. When you save your table for the first time, Access gives you the opportunity to name your table. Each table name must be unique; hence, two tables in the same database cannot have the same name. The table name should describe the data in the table; can consist of letters, numbers, and spaces; and can be up to 64 characters long. When choosing a table name, try to keep it short. You can save a table by clicking the Save button on the Quick Access toolbar or by right-clicking the Tables tab and then choosing Save from the menu that appears.
1. 2. 3. 4. 5. 6. 7. Or 1. 2. 3. 4. 5.
Click the Add New Field column label. Activate the Datasheet tab. Click Rename in the Fields & Columns group. Type the field name. Press Enter. Access creates the field. Type the next field name. Access creates the field. Continue until you have created all of the fields in your table. Press Enter without entering a field name to end your entries.
Right-click the Add New Field column label. A menu appears. Click Rename Column. Type the field name. Press Enter. Access creates the field. Type the next field name. Access creates the field. Continue until you have created all of the fields in your table.
14
1. 2. 3.
Click the Save button on the Quick Access toolbar. The Save As dialog box appears. Type the name you want to give your table. Click OK. Access names your table.
Tip: You can use the Rename option at any time to rename any column. For example, you can rename the ID column Employee ID.
Data Types Data Type Text Use Notes Alphanumeric data. Use for . text and for numbers that are not used in mathematical calculations. Use for names, addresses, and other relatively short pieces of text. Can store up to 255 characters. Long text. Use for long pieces of text, such as notes and long descriptions. Can store up to 64,000 characters.
Memo
15
Number
Numeric data. Use for numbers you want to use in mathematical calculations. Use for dates and times. Use for currency. Unique sequential numbers or random numbers automatically inserted when you create a record. Use to create a primary key. Logical data. Use when only one of two values is valid. Yes/No, True/False, etc. Use to store hyperlinks. Use to store attachments. Use to attach an OLE object such as a Word document, Excel spreadsheet, or PowerPoint presentation.
If you are working with currency, use the currency type. Prevents rounding during calculation.
Yes/No
After you create the fields for a table, you can enter data by typing in each field. As you type, Access assigns a data type to each field based on your entry.
Assigned Data Types Sample Entry Smith http://www.website.com 10000 10,000 10,000.99 10000.999 01/01/2009 The date and time formats recognized are those of your user locale. January 1, 2009 12:10:33 Data Type Assigned Text Hyperlink Number, Long Integer Number, Long Integer Number, Double Number, Double Date/Time
Date/Time Date/Time
16
Regional Settings for English (United States) Number Currency Time Short Date Long Date 123,456,789.00 $123,456,789.00 3:39:44 PM 7/28/2008 Monday, July 28, 2008
Use the Windows Control panels Regional and Language options to view or change regional settings.
Data Types Data Type Number Format General Number Currency Euro Fixed Standard How Numbers Display As typed. Uses thousands separator. Follows regional settings. Uses currency format with Euro symbol. Displays at least one digit. Follows regional settings. Uses thousands separator. Follows regional setting.
17
Percent Scientific Currency General Number Currency Euro Fixed Standard Percent Scientific Date/Time General Date
Converts entry to percent. Uses scientific notation. As typed. Uses thousands separator. Follows regional settings. Uses currency format with Euro symbol. Displays at least one digit. Follows regional settings. Uses thousands separator. Follows regional setting. Converts entry to percent. Uses scientific notation. Date values display as numbers and time values as hours, minutes, and seconds followed by AM or PM. Follows regional settings. Uses the Long Date format specified in your Windows regional settings. Uses dd/mmm/yy, using the date separator specified in your Windows regional settings. Uses the Short Date format specified in your Windows regional settings. Uses hours, minutes, and seconds followed by AM or PM. Uses the separator specified in the Time setting in your Windows regional settings. Displays hours and minutes followed by AM or PM. Uses the separator specified in the Time setting in your Windows regional settings. Uses hours and minutes. Uses the separator specified in the Time setting in your Windows regional settings. Yes/No True/False On/Off
Medium Time
Short Time
Yes/No
18
1. 2. 3. 4.
Click the field label for the field to which you want to assign a data type. Activate the Datasheet tab. Click the down-arrow next to the Data Type field and then choose a data type. Click the down-arrow next to the Format field and then choose a format. Access assigns a data type and format to the field you selected.
Tip: If you want every record in a field to be unique, check the Unique box on the Datasheet tab in the Data Type & Formatting group. If you do not want the user to leave a field blank, check the Is Required box.
Tip: In the Data Type & Formatting group, there are several formatting options you can apply to numbers. If you want to use the Currency format, click the Currency button Percent button ; if you want to use the Percent format, click the ; or if you want to
; if you want to use a Comma number format, click the Comma button
increase or decrease the number of decimal place, click the Increase Decimal button .
or Decrease Decimal
Tip: You can create a new table at any time by activating the Create tab and then clicking Table.
19
Comments Enables you to restrict the number of characters stored in a text field to 0 to 255 characters. The default is 255. Enables you to select the type of number stored in a field. Values Stored 0 to 255. (No fractions) 9.999... x 1027 through +9.999... x 1027 32,768 to +32,767 (No fractions) 2,147,483,648 to +2,147,483,647 3.4 x 1038 to +3.4 x 1038 numeric floating point values. Up to seven significant digits. 1.797 x 10308 to +1.797 x 10308 1038 numeric floating point values. Up to fifteen significant digits. Globally Unique Identifier (GUID). Used by Access to establish a unique identifier for replication. Determines how numbers display. When you use the currency, fixed, standard, and percent formats. Access follows the settings specified in Regional Settings in the Windows Control Panel for negative amounts, decimal and currency symbols, and decimal places. Displays as typed. Uses thousands separator. Follows regional setting. Uses currency format with Euro symbol. Displays one digit. Follows regional settings. Uses thousands separator. Follows regional settings. Converts entry to percent.
Double
Replication ID
Format
Number
Currency Number
20
Uses scientific notation. Displays date and time. Example: 01/02/99, 06:28:21 PM Displays Day of Week and Date: Example: Saturday, January 02, 1999 Example: 02-Jan-99 Example: 01/02/99 Example: 6:28:21 PM Example: 6:28 PM Example: 18:28 Text character required. Text character not required. Changes all characters to lowercase. Changes all characters to uppercase. If the Lookup Display Control is a text box, displays Yes/No. If the Lookup Display Control is a text box, displays True/False. If the Lookup Display Control is a text box, displays On/Off. Auto. Number of decimals displayed depends on the format setting. 015. Used with format property. Determines the number of digits that display to the right of the decimal point.
Medium Date Short Date Long Time Medium Time Short Time Text and Memo @ & < > Yes/No Yes/No True/False On/Off Decimal Places Determines number of decimal places Access displays.
Input Mask
Special characters used to control the values the user can input. Field name displayed on forms. Sets the value that appears in the field by default when a record is created. Sets the requirements for user input.
Validation Rule
21
Validation Text
Text for error messages that are sent when validation rules are broken. Specifies whether the field Yes: Required is required or not. No: Not Required Determines whether a zero- Yes: Is valid length field is a valid entry. No: Not valid Specifies whether an index Yes: Create index. should be created in a field. No: Do not create index. Indexes speed up queries.
1. 2.
Activate the Create tab. Click Table Design in the Tables group. Access changes to Design view and the Table Tools become available.
3. 4. 5. 6. 7. 8. 9. 10.
Type the first field name in the Field Name field. Press the Tab key. Click the down-arrow that appears when you click in the Data Type field and then select a data type. Click Primary Key if the column you created is a primary key. A small key appears next to the field name. Press the Tab key. Type a description. The description is optional. Press the Tab key. Access moves to the Field Name field. Repeat steps 3 through 10 until you have created all of your fields.
22
1. 2. 3. 4.
Click the field for which you want to set the field properties. Activate the General tab in the Field Properties area. Set the properties you want to set. Repeat steps 1 through 3 until you have set all the properties for all fields.
You can use Design view to create or modify a table. After you finish the task, you must save the table by clicking the Save button on the Quick Access toolbar. 1. 2. 3. Click the Save button on the Quick Access toolbar. Access saves the table unless you are saving for the first time. If you are saving for the first time, the Save As dialog box appears. Type the name you want to give your table. Click OK. Access saves the table. You can now access the table by using the Navigation pane.
What are views? Views are different ways of looking at the same object. Tables have four views: Datasheet view, Pivot Table view, Pivot Chart view, and Design view. You use Datasheet view to create a table, edit data, or view data; Pivot Table view to create a pivot table; Pivot Chart view to create a pivot chart; and Design view to create a table or modify an existing table.
23
Tip: You can also use a template to create a table. Access has several templates from which you can choose. When using a template, you create the table and then modify it to suit your needs. 1. 2. 3. Activate the Create tab. Click the Table Templates button in the Tables group. A menu appears. Click the template you want to use. Access creates a table based on the template.
Departments Department ID Primary Key 1 2 3 4 5 Administration Computer Science English History Math Department
Access has a wizard to help you create lookup columns. Creating a Lookup column creates a relationship between two tables. See the section Create Relationships in Lesson 3 to learn more about relationships.
To use the Lookup Wizard to create a lookup column: Open the Lookup Wizard
24
1. 2. 3. 4. 5. 6.
Open the table to which you want to add a lookup column. Click the field label for the field before which you want to add a lookup column. Activate the Datasheet tab. (You must be in Datasheet view.) Click the Lookup Column button in the Fields & Columns group. The Lookup Wizard appears. Make sure the radio button next to I want the lookup column to look up the values in a table or query. is selected. Click Next. The Lookup Wizard moves to the next page.
25
1. 2. 3.
Click a radio button to select what you want to base your lookup column on. Choose from Tables, Queries, or Both. Click to select the table or query you want. Click Next. The Lookup Wizard moves to the next page.
Select fields
You choose the fields you want to appear in your lookup column. Be sure to include the primary key.
1. 2.
3.
Click the field you want. Click the single right-arrow button . Access places the field in the Selected Fields column. Repeat this process to select additional fields. If you want all the fields in the table, click the double right-arrow button . Note: Use the single left-arrow and the double left-arrows to deselect fields. Click Next. The Lookup Wizard moves to the next page.
Sort fields
The Lookup Wizard allows you to sort the records in a lookup column. You can display records in order, either ascending (alphabetical from A to Z, lowest number to highest number, earliest date to latest date) or descending
26
(alphabetical from Z to A, highest number to lowest number, latest date to earliest date). You can also sort within a sort. For example, you can sort by state and then within each state by city, and then within each city by street address. If you are creating a sort within a sort, create the highest level sort on line one, the next level sort on line two, and so on. In the state, city, and street address example, you create the state on line one, the city on line two, and the street address on line three.
1. 2. 3.
Click the down-arrow and then select the field you want to sort by. Click to select a sort direction (the button toggles between ascending and descending). You can sort within a sort for up to four levels. Click Next. The Lookup Wizard moves to the next page.
1. 2.
Deselect Hide Key Column, if you wish. Adjust the column widths by dragging or double-clicking the right vertical border for the column.
27
3. Click Next. The Lookup Wizard moves to the next page.
Specify the Key Field (if you deselected Hide Key Column)
A key field is a field that uniquely identifies a record. If you deselected Hide Key column, you must tell Access which field is the key field.
1. 2.
Click the key field. Click Next. The Lookup Wizard moves to the next page.
1. 2. 3.
Type the name you want to give the column. Click if you want to allow multiple values in the field. Click Finish. Access creates the lookup column.
28
How do I create a lookup column by typing a list? 1. 2. 3. 4. 5. 6. 7. 8. 9. Activate the Datasheet tab. (These instructions assume you are in the Datasheet view.) Click the Lookup Column button in the Fields & Columns group. The Lookup Wizard appears. Click the radio button next to I will type the values I want. Click Next. The Lookup Wizard moves to the next page. Type the number of Columns you want in the Number Of Columns field. Type the values you want under the column heading. Click Next. The Lookup Wizard moves to the next page. Type the column label you want. Click Finish. Access creates a lookup column based on your list.
29
Enter Records
After you have created a table, you can enter data into it. To enter data into an AutoNumber field:
Press the Tab key. When you make an entry into another field in the record, Access will automatically make an entry into the AutoNumber field.
1. 2. 3.
Click the down-arrow that appears when you click in the field. Click to select the entry you want. Press the Tab key.
Click the checkbox for Yes; leave the checkbox unchecked for No.
30
1. 2.
Double-click in the attachment field. The Attachments dialog box appears. Click Add. The Choose File dialog box appears.
3. 4.
Click the file you want to add. Click Open. The Choose File dialog box closes.
31
5.
Note: You can attach multiple files to a single attachment field. To enter data into a date field:
Or
Select the date from the calendar that appears to the left of the field when you click in the field. You click the calendar to open it. Use the left-arrow at the top of the calendar to move to the previous month; use the right-arrow at the top of the calendar to move to the next month. When you reach the proper month, click the proper date.
To add data to an OLE Object field: An OLE object is an object such as a Word document or an Excel Spreadsheet.
32
1. 2.
Right-click in the field. A menu appears. Click Insert Object. The Microsoft Office Access dialog box appears.
Create New:
3.
Click the Create New radio button if you want to create a new object. a. Click the object type you want to create. b. Click OK. Access opens the program for the object type you selected. You can create the object. c. Create the object and then close the program for the object type you selected. Access links to the object.
33
3.
Click the Create From File radio button if you want to use an existing file. a. Type the path to the file or click the Browse button and locate the file. b. Click OK. Access links to the object.
To add data to other field types: For all other fields, type your entry and then press the Tab key.
34
1. 2. 3. 4. 5. 6.
Activate the External Data tab. Click the Excel button in the Import group. The Get External Data Excel Spreadsheet Wizard appears. Click the Browse button. The File Open window appears. Locate the spreadsheet you want to import. Click the Open button. The path to the file you selected appears in the File Name field. Click OK. Access moves to the next page.
1. 2. 3.
Click Show Worksheets to import a worksheet, or click Show Named Ranges to import a named range. Click the worksheet or named range you want to import. Click Next. Access moves to the next page.
1. 2.
Click First Row Contains Column Headings if the first row of your Excel spreadsheet contains column headings. Click Next. Access moves to the next page.
36
1.
2.
Click a column heading to select a column. a. Type the Access tables column heading in the Field Name field. b. Choose a Data type. c. Indicate if the field should be indexed and, if so, select the type of index. d. Check the Do Not Import Field box for any column you do not want to import. Click Next. Access moves to the next page.
37
You can let Access assign the primary key, choose the primary key yourself, or have no primary key by selecting the correct option on this page. 1. Click to choose the proper radio button. If you want Access to add the primary key, click Let Access Add Primary key. If you want to add the primary key, click Choose My Own Primary Key and then click the downarrow and select the field you want to use as the key field. If you do not want to add a primary key, click No Primary Key. Click Next. Access moves to the next page.
2.
1. 2. 3.
Type the name you want to give your table. Click Finish. Access moves to the next page. Click Close. Access imports the table.
Modify a Table
38
After you create a table, you may need to modify it. You can delete columns, insert columns, or move columns. Delete Columns The Delete option permanently deletes columns and all the data contained in them. You cannot undo a column delete. To delete columns:
1. 2. 3. 4.
Click and drag to select the columns you want to delete. Activate the Datasheet tab. Click Delete in the Fields & Columns group. A prompt appears. Click Yes. Access deletes the columns you selected.
Insert Columns The Insert option inserts a column before the selected column. To insert a column:
39
1. 2. 3.
Click the column head of the column before which you want to insert a column. Activate the Datasheet tab. Click Insert in the Fields & Columns group. Access inserts a new column.
Tip: If you right-click a column label, you can use the menu that appears to insert or delete columns. To delete a column: 1. 2. Right-click the column head you want to delete. A menu appears. Click Delete Column.
To insert a column: 1. 2. Right-click the column head before which you want to insert a column. A menu appears. Click Insert Column.
Move a Column You can use the Move option to move a column from one location to another. To move a column: 1. 2. 3. 4. Move your mouse pointer over the horizontal line under the column label. Your mouse pointer turns into a four sided arrow. Press your left mouse button Click and drag the field to the new location. A dark line appears at the new location. Release you left mouse button. Access moves the column.
40
1. 2. 3.
Activate the Home tab. Click the Go To button in the Find group. A menu appears. Click First to go to the first record, Previous to go to the previous record, Next to go to the next record, Last to go to the last record, or New to create a new record.
Tip: You can also create a new record by choosing the Home tab and then clicking New in the Records group. To use keys to move around a table: Key to Press Tab Action Moves to the next field to the right. If you are in the last field in a record, moves you to the next record. If you are in the last record in a table, creates a new record. Moves to the next field to the left. If you are in the first field in a record, moves you to the previous record. Moves to the previous field. If you are in the first field in a record, moves you to the previous record. Moves to the next field. If you are in the last field in a record, moves you to the next record. If you are in the last record in a table, creates a new record. Moves you up one record. Moves you down one record.
Left-Arrow
Shift+Tab
Right-Arrow
Up-Arrow Down-Arrow
41
Ctrl++ Creates a new record.
1 2 3 4 5 6
Go to First Record Go to Previous Record The Current Record Go to Next Record Go to Last Record Create a New (Blank) Record
42
Delete a Record
If enter a record by error, you can delete it. To delete a record: 1. 2. 3. 4. Or Select the record you want to delete. Activate the Home tab. Click Delete in the Records group. A prompt appears. Click the Yes button.
43
Select the record you want to delete. Right-click. A menu appears. Click Delete Record. A prompt appears. Click the Yes button.
44
1. 2. 3. 4. 5.
6.
Activate the Create tab. Click the Query Design button in the Other group. The Show Table dialog box appears. Activate the Tables tab if you want to base your query on tables, activate the Queries tab if you want base your query on queries or activate the Both tab if you want to base your query on both tables and queries. Click to choose the table or query on which you want to base your query. Click Add. The table appears in the window. a. Click to choose the next table or query on which you want to base your query. b. Continue clicking tables or queries until you have all the tables and queries you plan to use. Click Close. Access changes to Query Design view.
45
1. 2. 3.
Open a table or query in Query Design view. Click the down-arrow in the first field on the Field row and then select the tablename.* option. The table name appears on the table line. Click the Run button. Access retrieves all of the fields and records for the table and displays them in Datasheet view.
46
To change to Query Design view:
1. 2. 3.
Activate the Home tab. Click the down-arrow below View in the Views group. A menu appears. Click Design View. Access changes to Query Design view. You can modify your query.
Tip: You can also click the Design button Design view.
47
1. 2. 3.
Open a table or query in Query Design view. Choose the field name you want to display in the field line. Click the Run button. Access retrieves the column you chose.
48
You can use an Access query to retrieve multiple columns of data. On the Field line in Query Design view, choose the field name of each field you want to retrieve in the order you want to retrieve them. To retrieve multiple columns:
1. 2. 3.
Open a table or query in Query Design view. Choose the field names you want to retrieve in the order you want to retrieve them. Click the Run button. Access retrieves the columns you chose.
49
Sort a Query
When creating a query, you can sort the rows you retrieve in ascending or descending order by choosing the option you want on the Sort row in Query Design view. To perform a sort:
50
1. 2. 3. 4.
Open a table or query in Query Design view. Choose the field names you want to retrieve in the order you want to retrieve them. Under the field you want to sort, click the down-arrow and then choose Ascending or Descending. Click the Run button. Access retrieves the columns you chose and displays the rows in the order you specified.
51
1. 2. 3. 4. 5. 6.
Open a table or query in Query Design view. Choose the field names you want to retrieve in the order you want to retrieve them. Choose the field names you want to sort by in the order you want to sort. Under the fields you want to sort by, choose Ascending or Descending. Deselect the Show button for the columns you do not want to display. Click the Run button. Access retrieves the columns you chose and displays the rows in the order you specified.
52
Meaning Equal to
<>
>
>=
Field Type Character Number Date Not equal to Character Number Date Greater than Character Number Date Greater than or Character equal to Number
Entry Format = "DE" =5 = #2/16/88# <> "DE" <> 5 <> #2/16/88# > "DE" >5 > #2/16/88# > = "DE" >=5
53
<
Less than
<=
In
Date Character Number Date Character Number Date Character Number Date Character Number Date Character Number Date
Not In
Not equal to any item in a list Between two values, greater than or equal to one and less than or equal to the other Not between two values
Between
> = #2/16/88# < "DE" <5 < #2/16/88# <= "DE" <= 5 <= #2/16/88# In ("DE", "NJ") In (5, 9, 17) In (#2/16/88#, #2/3/90#, #12/15/88#) Not In ("DE", "NJ") Not In (5, 9, 17) Not In (#2/16/88#, #2/3/90#, #12/15/88#) Between "C" And "F" Between 5 And 10 Between #1/1/88# And #12/31/88#
Not Between
Is Null
Is Not Null
Like
Not Like
The value is Character missing from Number the field Date The value is not Character missing from Number the field Date Like a specified Character pattern. Number * means any Date series of characters. ? means any single character. Not like a Character specified Number pattern. Date * means any series of characters. ? means many
Not Between "C" And "F" Not Between 5 And 10 Not Between #1/1/88# And #12/31/88# Is Null Is Null Is Null Is Not Null Is Not Null Is Not Null Like "S*" Like "1*" Not Applicable
54
single character.
When using the Like and Not Like criteria, where you place the asterisk(*) or question mark (?) determines the type of search Access performs. Like "Jo*" finds all records in the field that begin with Jo. It would find Jones, Johnson, and Jordan. Like "*son" finds all records in the field that end with son. It would find Stevenson, Jackson, and Peterson.Like "*456*" finds all records that contain 456 anywhere in the field. It would find 456123789, 123456789, and 123789456. The sequence Like "?en" finds all three character field entries where the second and third characters are en. It would find Ben, Len, and Jen. The sequence Like "Jo?" finds all three character field entries where the first and second characters are Jo. It would return Joe, Joy, and Jon. The sequence Like "T?m" finds all three character field entries where the first and third characters are T and m. It would return Tim, Tom, and Tam. To retrieve specific records:
1. 2. 3. 4. 5. 6. 7.
Open a table or query in Query Design view. Choose the field names you want to retrieve in the order you want to retrieve them. Choose the field names you want to sort by in the order you want to sort. Under the fields you want to sort by, choose Ascending or Descending. Deselect the Show button for columns you do not want to display. Enter your selection criteria on the Criteria line. Click the Run button. Access retrieves the columns you chose and displays the rows in the order you specified.
55
56
1. 2. 3. 4. 5. 6. 7.
Open a table or query in Query Design view. Choose the field names you want to retrieve in the order you want to retrieve them. Choose the field names you want to sort by in the order you want to sort. Under the fields you want to sort by, choose Ascending or Descending. Enter your selection criteria on the Criteria line and the Or line, as needed. Deselect the Show button for columns you do not want to display. Click the Run button. Access retrieves the columns you chose and displays the rows in the order you specified.
57
To create a query that uses two or more tables:
1. 2. 3. 4. 5. 6.
Open the tables and/or queries you want to use in Query Design view. Choose the field names you want to retrieve in the order you want to retrieve them. Choose the field names you want to sort by in the order you want to sort. Under the fields you want to sort by, choose Ascending or Descending. Enter your selection criteria, if necessary (Not applicable in this example). Deselect the Show button for columns you do not want to display (Not applicable in this example). Click the Run button. Access retrieves the columns you chose and displays the rows in the order you specified.
Save a Query
After you create a query, you can save it. You can rerun a saved query at any time. If you change the data on which the saved query is based, you will see the changes when you rerun the query. To save a query:
58
1. 2. 3.
Click the Save button on the Quick Access toolbar. Access saves the query unless you are saving for the first time. If you are saving for the first time, the Save As dialog box appears. Type the name you want to give your query. Click OK. Access saves the query. You can now access the query by using the Navigation pane.
Tip: You can also save by right-clicking a querys tab and then selecting Save from the menu that appears. Access saves the query unless you are saving for the first time. If you are saving for the first time, the Save As dialog box appears. Type the name you want to give the query and then click OK. Access saves the query. You can now access the query by using the Navigation pane.
Tip: After you have saved a query, you can run it by opening the Navigation pane and then clicking the name of the query.
Modify a Query
Once created, a query can be modified. Simply open the query in Query Design view and make the changes. You can add columns, change the sort order, change the criteria, and make other changes. In Query Design view, the Query Setup group offers several options that can assist you. Use the Insert Rows button to insert a row in the criteria area. Click anywhere in the row before which you want to insert a new row and then click the Insert Rows button.
Use the Insert Columns button to insert a column. Click anywhere in the column before which you want to insert a column and then click the Insert Column button .
Use the Delete Rows button to delete a row in the criteria area. Click anywhere in the row you want to delete and then click the Delete Row button.
Use the Delete Columns button click the Delete Column button .
to delete a column. Click anywhere in the column you want to delete and then
59
1. 2. 3. 4. 5. 6.
Open the table or query on which you want to base your new table on in Query Design view. Enter the criteria on which you want to base your new table. Click the Make Table button. The Make Table dialog box appears. Type the name you want to give your new table. Click OK. Click Run. You see the following prompt.
7. 8. 9.
Click Yes. Close the query. (Right-click the querys tab and then click Close.) Double-click the new tables name in the Navigation pane to view the new table.
60
If instead of entering predetermined criteria, you want to prompt users when a query runs, you can create a parameter query. You create a parameter query by enclosing a question in square brackets ([]). For example, if you want to create a parameter query that asks users which State they want to use from the Students table, you would type [Which State?] on the Criteria line under the State column. When the query runs, Access will prompt the user for the answer to your question. To create a parameter query:
1. 2. 3. 4.
Open a table or query in Query Design view. Create your query. On the Criteria line, type the prompt within square brackets. Click the Run button. Access prompts you.
5. 6.
Respond to the prompt. Click OK. Access displays the results of your query in Datasheet view.
61
Note: If you want to make your user prompt more flexible, use one of the following formats.
> [Prompt]
Returns all records that contain the value you enter. Example: If you enter ad, Access returns all records that include the sequence ad anywhere in the field. Returns all records that end with the value you enter. Example: If you enter S, Access returns all records that end with S. Returns all records that begin with the value you enter. Example: If you enter S, Access returns all records that begin with S. Find all records with a value greater than the value you enter. Example: If you enter 5, Access returns all records that are greater than 5.
Note: You can also use < (less than) ,<= (less than or equal to) >=, >= (greater than or equal to), or <> (not equal)
62
1. 2. 3. 4.
Open the Navigation pane. Click the table or query on which you want to base your form. Activate the Create tab. Click Form in the Forms group. Access creates a form.
63
You can use the Navigation bars to move through the records on a form.
1 2 3 4 5 6
Go to First Record Go to Previous Record The Current Record Go to Next Record Go to Last Record Create a New (Blank) Record
Tip: After you create a form, you can save it. You can open a saved form at any time. To save a form: 1. 2. 3. Click the Save button on the Quick Access toolbar. Access saves the form unless you are saving for the first time. If you are saving for the first time, the Save As dialog box appears. Type the name you want to give the form. Click OK. Access saves the form. You can now access the form by using the Navigation pane.
You can also save by right-clicking a forms tab and then selecting Save from the menu that appears. Access saves the form unless you are saving for the first time. If you are saving for the first time, the Save As dialog box appears.
64
Type the name you want to give the form and then click OK. Access saves the form. You can now access the form by using the Navigation pane.
1. 2. 3. 4.
Open the Navigation pane. Click the table or query on which you want to base your form. Activate the Create tab. Click Split Form in the Forms group. Access creates a split form.
65
66
1. 2. 3. 4.
Open the Navigation pane. Click the table or query on which you want to base your form. Activate the Create tab. Click Multiple Items in the Forms group. Access creates a multiple items form.
67
Tip: A view is a way of looking at an Access object. Forms have three views: Form view, Layout view, and Design view. You can enter, edit, and view data in Form view. You can modify a form in Layout view or Design view. In Layout view, you can see your data, and the form you see closely resembles what your form will look like when you view it in Form view. You can make most, but not all, changes to your form in Layout view. Design view displays the structure of your form. In this view you cannot see the underlying data, but you can perform some tasks in Design view that you cannot perform in Layout view. This tutorial focuses on Layout view. To change the view: 1. 2. 3. 4. Open the form. Activate the Format tab. Click the down-arrow under the View button. A menu appears. Click the view you want.
Modify a Form
After you create a form, it opens in Layout view, where you can modify it. To change the size of a field: 1. 2. Click a side of the field and drag to change the width of the field. Click the top or bottom of a field and drag to change the height of a field.
To move a datasheet: 1. 2. Click the datasheet to select it. Click and drag the four-sided arrow in the upper-right corner to move the datasheet.
To resize a datasheet: 1. 2. 3. Click the datasheet to select it. Click a side of the datasheet and drag to change the width. Click the top or bottom of the datasheet and drag to change the height.
To apply an AutoFormat: The AutoFormat option on the Format tab enables you to apply formats quickly, such as background colors, field colors, field label colors, and fonts. 1. 2. 3. Activate the Format tab. Click AutoFormat. The AutoFormat menu appears. Click the format you want to apply.
To change a form title: When you create a form, by default, Access uses the form name as the title. You can change the title. 1. 2. 3. Activate the Format tab. Click the Title button. Type the new title.
68
You can easily add the date and time to your form. 1. 2. Activate the Format tab. Click the Date and Time button. The Date and Time dialog box appears. Select the date and time format you want. The date and time appear on your form.
Change Fonts and Formats You can use options on the Format tab to manually apply individual formats to your report. However, before you can apply a format to a field or field label, you must select it. To select a field or field label, click it. To select multiple items, hold down the Shift key and then click each item you want to select. A box surrounds selected items. Change Fonts and Formats Button Shortcut Key Function
Layout ViewFormat Tab, Font Group Apply a font to the current selection. Set the size of the font for the current selection. Ctrl-b Ctrl-i Ctrl-u Ctrl-l Ctrl-r Ctrl-e Bold the current selection. Italicize the current selection. Underline the current selection. Left-align the selection. Right-align the selection. Center the selection. Change the font color. Change the background color. Change the alternating color. For example, you can have every other row on a datasheet appear in an alternating color. Layout ViewFormat Tab, Formatting Group Apply a Number format. Use a currency symbol. Change to percent. Use thousand separators. Increase decimal places. Decrease decimal places. Layout ViewFormat Tab, Gridlines Group
69
Add gridlines.
Change the weight of gridlines. Change the style of gridlines. Change the color of gridlines. Layout ViewFormat Tab, Controls Group Add a logo.
Add or change a title. Add a date and time. Set line thickness. Set line style. Set line color.
70
1. 2. 3. 4.
Open the Navigation pane. Click the table or query on which you want to base your report. Activate the Create tab. Click the Report button in the Reports group. Access creates your report and displays your report in Layout view. You can modify the report.
71
Tip: After you create a report, you can save it. 1. 2. 3. Click the Save button on the Quick Access toolbar. Access saves the report unless you are saving for the first time. If you are saving for the first time, the Save As dialog box appears. Type the name you want to give your report. Click OK. Access saves the report. You can now access the report by using the Navigation pane.
As with other objects, you can also save a report by right-clicking the reports tab and selecting Save. Saved reports appear in the Navigation pane.
Tip: Reports created by using the Report button are plain and simple. The Modify a Report section of this lesson teaches you how to customize a report to meet your needs.
Tip: Access reports created simply by using the Report button have several sections. They are detailed in the following table.
Sections of a Report
Appears at the top of the first page and displays the report title. Appears at the top of every page and displays the headings (field labels)
72
for each column. Page Footer Appears at the bottom of every page and displays the page number and total number of pages. Appears between the page header and page footer and displays the records from the table or query. This section is optional. Appears on the last page of the report and displays summary information such as grand totals.
Detail Section
Report Footer
1. 2.
Activate the Create tab. Click Report Wizard in the Reports group. The Report Wizard appears.
1. 2.
3. 4.
Click the down-arrow next to the Table/Queries field and then click the table from which you want to select fields. Click a field and then click the single-right arrow to select a single field, click the double-right arrows to select all fields, click a field and then click the single-left arrow to deselect a single field, or click the double-left arrow to deselect all fields. Repeat steps 1 and 2 for each table from which you want to select fields. Click Next. The Report Wizard moves to the next page.
Group
When using the Report Wizard, you can group data. Grouping puts all of the values in a field into a group based on the fields value. For example, if your data is grouped by the Department field and the records in the Department field
74
have values such as Administration, Computer Science, and English. Access will group all of the data for the Administration department together, all of the data for the Computer Science department together, and all of the data for the English department together.
1. 2.
Click to select the field by which you want to group your data. You may not see this page of the wizard if you are selecting data from a single table. Click Next. The Report Wizard moves to the next page.
75
3. 4.
5. 6.
Click a field you want to group by. Click the right-arrow to select a field; click a field and then click the left arrow to deselect a field. Use the upand down-arrows to change the order of the groupings. If you are only using one table, this may be your first opportunity to select a field to group by. Repeat steps 3 and 4 for each field you want to group by. Click Next. The Report Wizard moves to the next page.
76
1. 2. 3.
Click the down-arrow and then select the field you want to sort by. Click the button to choose ascending or descending order. Clicking the button toggles between Ascending and Descending. You can sort up to four levels. Click the Summary Options button. The Summary Options window appears.
4.
77
5. 6. 7. 8. Click to select whether you want detail and summary data or if you want summary data only. Click if you want to calculate the percent to the total for sums. Click OK. The Summary Options window closes. Click Next. The Report Wizard moves to the next page.
1. 2. 3. 4.
Click to select a layout. Click to select a page orientation. Choose the Adjust The Field Width So All Fields Fit On A Page option if you want all fields to fit on a single page. Click Next. The Report Wizard moves to the next page.
Style
A style is a set of formats consisting of such things as background colors, fonts, font colors, and font sizes. Access supplies predesigned styles that format titles, labels, and more. When you choose a style, the left side of the window displays a preview.
78
1. 2.
Click to select a style. Click Next. The Report Wizard moves to the next page.
Create a title
On the final page of the Report Wizard, you can title your report. The title appears at the top of the report and on the Navigation pane.
79
1. 2.
Type the title you want to give the report. Click Finish. Access creates, saves, and opens your report in Layout view.
Tip: Reports created with the Report Wizard may have the following two sections in addition to the sections found in reports created by using the Report button.
80
Sections of a Report
Appears before a group and displays information about the group. Appears after a group and summarizes the group data.
Modify a Report
After you create a report, you can modify it. You can add groups or sorts, add fields, change labels, and perform many other tasks. You can view a report in Report view, Layout view, Design view, and Print Preview. You can modify a report in Layout view or Design view. In Layout view, you can see your data, and the report you see closely resembles how your report will look when you print it. You can make most, but not all, changes to your report in Layout view. Design view displays the structure of your report. In this view you cannot see the underlying data, but you can perform some tasks in Design view that you cannot perform in Layout view. This tutorial focuses on Layout view.
Change the Size of a Field or Label If the data in a field or label seems crowded, if some of the data in the field or label does not appear, or if the data appears as pound signs (####), the field or label is too small.
Tip: Incidentally, if you want to change the height of records, click the top or bottom of a field border and drag upward or downward.
81
Add a Group or Sort When you create a report by clicking the Report button, you are not given options that enable you to group or sort. You can use the Group & Sort button on the Format tab to create a group or sort. When you create a report by using the Report Wizard, you can use the Group & Sort button to add or modify a group or sort.
1. 2. 3.
Open your report in Layout view. Activate the Format tab. Click Group & Sort in the Grouping and Totals group. The Group, Sort, and Total pane appears.
Add a group
82
4.
Click Add A Group and then select the field by which you want to group. Access groups and sorts the field.
Add a sort
5.
Click Add A Sort and then select the field on which you want to sort. Access sorts the field.
Groups and sorts display in the Group, Sort, and Total pane in levels. Access performs the highest-level group or sort first, the second level next, and so on.
83
After you have added a group or sort, you can set several options by clicking the More button and then clicking the down-arrow next to each option and making your choices. Group, Sort, and Total Pane Options Option Sort order With A on top From smallest to largest From oldest to newest Group interval Description Use these options to choose from ascending or descending order.
Set how you want to group. For example, if you want to group by the first letter of the last name so that all As are together, all Bs are together. etc., you can select By First Character. Select the field you want to total on and the type of total you want. Your total can be a sum, average, count, etc. You can also choose whether you want to show a grand total, totals as a percentage of a grand total, display totals in the header, or display totals in the footer. Allows you to add or change the field label. Group headers precede each group. This option allows you to determine whether you want a header section. Group footers are printed at the bottom
Totals
84
of each group. This option allows you to determine whether you want a footer section. Keep group together Use these options to determine where a page break will occur when you print: Do not keep group together on one page. This option allows page breaks within a group. Keep whole group together on one page. This option prevents page breaks within a group. Keep header and first record together on one page. This option prevents a header from printing at the bottom of a page with no records.
There are three buttons on the right side of the Group, Sort, and Total pane. If you want to delete a group or sort, click the group or sort you want to delete and then click the Delete button. Groups and sorts execute in the order they are listed in the Group, Sort, and Total pane. If you want to change the order of execution, click the group or sort you want to move up or down and then click the Move Up or Move Down button to move a group or sort up or down a level.
To add a field:
1. 2. 3. 4.
Open your report in Layout view. Activate the Format tab. Click the Add Existing Fields button in the Controls group. The Field List pane appears. Click Show All Tables if the field you want to add does not appear.
85
5.
Click the field you want to add and drag it onto your report. A thick line appears on the report. Access places the field before the line. If you want the field to appear in the detail area, be sure to drag it to the detail area.
To delete a field:
1. 2. 3. Open your report in Layout view. Click the field you want to delete. Press the Delete key. Access deletes the field.
To move a column:
1. 2. 3. Open your report in Layout view. Click the column label. Drag the column to the new location. Access moves the column to the new location.
To change a title:
1. 2. 3. 4. 5. Open your report in Layout view. Double-click in the Title field. Click and drag to select the current title. Type a new title. Click anywhere outside the Title field. Access changes the title.
86
1. 2. 3. 4. Open your report in Layout view. Activate the Page Setup tab. Click the Size button in the Page Layout group. A menu appears. Click the size of the paper you are going to print on.
To change margins:
1. 2. 3. 4. Open your report in Layout view. Activate the Page Setup tab. Click the Margins button in the Page Layout group. A menu appears. Click the margin size you want. Access changes the page margin.
87
4. 5. 6. 7. 8.
Deselect the Include Date box if you do not wish to include the date. Click to select a format if you are including the date. Deselect the Include Time box if you do not wish to include the time. Click to select a format if you are including the time. Click OK. Access places the date and/or time in your report.
Apply an AutoFormat You can use the AutoFormat option on the Format tab to apply formats such as background colors, fonts, and font sizes quickly.
To apply an AutoFormat:
1. 2. 3. Activate the Format tab. Click AutoFormat. The AutoFormat menu appears. Click the format you want to apply.
Change Fonts and Formats You can use options on the Format tab to manually apply formats to your report. However, before you can apply a format to a field or field label, you must select the field or field label by clicking it. To select multiple items, hold down the Shift key and then click each item you want to select. A box surrounds selected items.
Button
Shortcut Function Key Apply a font to the current selection. Set the size of the font for the current
88
selection. Ctrl-b Ctrl-i Ctrl-u Ctrl-l Ctrl-r Ctrl-e Bold the current selection. Italicize the current selection. Underline the current selection. Left-align the selection. Right-align the selection. Center the selection. Change the font color. Change the background color. Change the alternating color. For example, you can have every other row in the detail area appear in alternating colors. Layout ViewFormat Tab, Formatting Group Apply a Number format. Use a currency symbol. Change to percent. Use thousand separators. Increase decimal places. Decrease decimal places. Layout ViewFormat Tab, Gridlines Group Add gridlines.
Change the weight of gridlines. Change the style of gridlines. Change the color of gridlines. Layout ViewFormat Tab, Controls Group Add a logo.
89
Tip: After you modify your report, you must save it if you want to keep the changes. To save, click the Save button on the Quick Access toolbar or right-click the reports tab and then click Save.
To create labels:
Open the Labels Wizard
1. 2. 3.
Click the table or query you want to use to create a label. Activate the Create tab. Click Labels in the Reports group. The Labels Wizard appears.
90
1. 2.
Click to select the Product Number in the Product Number field. Click Next. The Label Wizard moves to the next page.
1. 2.
Click the down-arrow next to the Font Name field and then select the font. A preview appears in the Sample box. Click the down-arrow next to the Font Size field and then select the font size. A preview appears in the Sample box.
91
3. 4. 5. 6. 7. Click the down-arrow next to the Font Weight field and then select the font weight. A preview appears in the Sample box. Click the button next to the Text Color field and then select a color you want your text to have. A preview appears in the Sample box. Click the Italic box if you want to italicize. A preview appears in the Sample box. Click the Underline box if you want to underline. A preview appears in the Sample box. Click Next. The Label Wizard moves to the next page.
Create a layout
You create the layout of your labels by selecting fields and placing them in the Prototype Label box. You type any text or spaces that you want to appear on your label.
1. 2. 3. 4. 5.
Click a field name and then click the right-arrow to place the field on the prototype label. Press the spacebar to leave spaces. Press the Enter key to move to a new line. Type any text you want to appear on the label. Click Next. The Label Wizard moves to the next page.
Sort
When creating labels, you can sort on any field and you can have multiple levels of sort. For example, you can sort by last name and then by first name.
92
1.
2.
Click to choose the fields you want to sort by. Click the single right-arrow to select a single field, click the double right-arrow to select all fields, click the single left-arrow to deselect a single field, click the double leftarrow to deselect all fields. Click Next. The Label Wizard moves to the next page.
1. 2.
Type a title for your report. The title will appear in the Navigation pane. Click Finish. Access displays the labels in Print Preview.
93
Tip: When you complete your labels you may get the following message. When printing mailing labels, you can usually ignore this message. Click the Show Help button to read the following:
This message may be the result of using a report created with the Label Wizard. This error message is commonly encountered when printing to label pages that have three or more labels per row. Usually this message can be ignored. If you do need to change the layout, try one or both of the following:
Reduce the width of the controls on the report. Reduce the width of the report to make sure the report is not wider than the printable area of the page.
Note that page size is dependent on the printer and the physical size of the paper you are printing to. In some cases it is necessary to rotate the page orientation from portrait to landscape to accommodate the selected print width.
Tip: When you view labels in Report view, they may appear in a single column. To see how your labels will appear when printed, use Print Preview.
94
Print a Report
Often, the people who use Access data only see a printed report. In Print Preview, you can see exactly how your report will look when printed, you can make changes to it, and you can print it. To print, click the Print button in the Print group. The Print dialog box opens and you can select your print options.
Several options are available to you in Print Preview. Print Preview Options Print Displays the Print dialog box. You can select such options as the printer, print range, and number of copies. Use this option to print your report. Click the Size button to set the size of the paper you are going to print on. Click the Portrait button to print with the shortest side of the paper as the top. Click the Landscape button to print with the longest side of the paper as the top. Click the Margins button to select a margin size of Normal, Wide, or Narrow. Margins define the amount of white space that surrounds your report. Prints the report data without other elements such as titles, and labels. Changes the cursor to a magnifying glass. When the magnifying glass displays a minus sign (), you can zoom out. When the magnifying glass displays a plus sign (+), you can zoom in. Click the down-arrow under the Zoom button to display a menu and choose a zoom level. Displays one page of the report in the Access window. Displays two pages of the report in the Access window. Displays a menu from which you can choose the number of page you want to display.
Tip: To view a report online, use Report view. Open your report. Activate the Home tab. Click the downarrow under the View button. Click Report view. Your report displays in Report view.