bitmedia Access 2007 Basics Databases such as Access are often considered by some to live in the shadows of the Microsoft Office Package. This is, as we hope to demonstrate in the course of this module, an unfair perception. It does not matter if you have never previously worked with a database or if your first experiences were with the previous version of the database: Office Access 2007 contains a whole host of improvements that make it easier to create a database than ever before. As a user, you will appreciate that these new and optimised features allow you to create databases faster. Entry test In this test you can check your previous knowledge. Entry test In this test you can check your previous knowledge. Database Basics Unlike word-processing programs such as Word, modern database management systems require some basic theoretical knowledge before you can properly get to grips with the software. Of course, this isn't absolutely imperative, but expertise gained in this chapter will be of enormous assistance to you when it comes to creating and using databases. You will also get to know the basic framework of databases (tables, key, relations etc.) so that you will be fully prepared for the first practical lessons. Basic database terms In this lesson you will become familiar with basic database terms. Examples from every use will clarify the tasks and elements of a database programme. What is Access 2007? Databases belong to the oldest applications of electronic data processing. Their ability not only to manage enormous inventories of data, but also to quickly analyse and present them is becoming increasingly important. In addition to self-contained, often very specialised database applications, such as address management, programmes which can be used to develop different database applications are gaining in importance. Tables and indexes The most significant components of a relational database are of central importance in understanding Access 2007. In this lesson Tables and Indexes will be presented in their general form and function (outside of Access). Primary and foreign keys Relationships (between tables) in relational databases are created using so-called Key Fields. However, before we discuss Relationships, you should first understand how keys work. Relationships themselves will be the subject of the next lesson. Relationships Tables can have Relationships with each other. In the following section, you will learn about the different types of Relationships that can exist in a database. A database and its creators In this lesson, you will learn about all of the people involved in creating a database. The design process and the actual users will not be forgotten.
Access 2007 Getting Started The first practical lesson is concerned with the first steps you have to take when working with Office Access 2007. You will learn how to start and close Access, how to use the inbuilt 'Help' feature and how to open your first databases. The highlight of the lesson will be to create your own database and thereby familiarise yourself with a new feature of Access 2007: the extensive and user-friendly database templates. Starting the programme Now that you have become familiar with the required theory, you re going to want to get started working with Access 2007 as quickly as possible. But first, this lesson will show you how to start and properly close the programme. The user interface In this lesson we will introduce you to the completely new operating concept of Access 2007. Customising the user-interface You became familiar with the elements of the new user-interface in Access 2007 in the previous lesson. Now, in this lesson, you will learn how to make effective use of the Ribbon and how to customise it. Furthermore, you will learn how to change the Quick Access Toolbar. Using Help Access 2007 provides users with a comprehensive Help function that can be used online as well as offline. The Internet is particularly useful since the most current information and features on Access 2007 can be downloaded. This lesson is concerned with the variety of new features available in the new Help. Creating and opening a database In this lesson, you will create and save your first new database. Furthermore, we will show you how to open and edit this database at a later time. Creating a database based on a template You have already learnt how to create and open a database. This is also the path normally taken for many database projects. However, there is also the possibility in Access 2007 to generate databases based on template. It may be that the new database is not exactly what you require, but they can still be quite useful for generating ideas and can be edited faster than it would take to build one from scratch. Access 2007 Getting Started Exercise 01 Access 2007 Getting Started Exercise 02
Tables Tables are arguably the most important components of a database. When you create a new database, you store the data in tables, i.e. theme-based lists composed of rows and columns. You can, for instance, create a contacts table by saving a list of names, addresses and telephone numbers, or an article table by saving information on articles. When designing a database, you should always begin by creating the tables - even before you create any other database objects. Alongside various different ways of creating databases, this chapter will teach you how to navigate within tables and how to input data. Creating tables in the Datasheet view Since you already know how to create and open a database, this lesson will concentrate on creating Tables. As you certainly remember from the lesson on database basics, Tables are the most important components in a relational database system such as Access 2007. Creating tables in the Design view Since you already know how to create a table in the Datasheet view, this lesson will focus on creating tables in the Design view without entering data. Creating tables based on templates In the previous lessons, you have learnt how to create tables in the Datasheet or Design views. However, this is even easier with Access 2007, particularly when Access provides the appropriate template. This lesson will show you how to use table templates. Editing tables If the first draft of your table does not quite meet your expectations, you can add or remove fields in the Design view. This lesson will show you how it s done. Changing field properties (in the Design view) Database programmes recognise a wide variety of different database field types. However, for entering data into the tables, the field properties are also very important. This is why different properties can be defined for fields so that a table can be precisely adapted to the desired requirements of your database. Creating Validation Rules Validation Rules are used to check the value of what is entered into a field. Validation rules allow you to prevent saving a dataset until all of the entered data corresponds to your parameters. In this lesson, you will be shown how to create and use validation rules. Entering data So far you have learnt a lot of important information about designing and adapting tables and their fields. Now it s time to actually enter data into the tables. Navigating in tables So far, you have most dealt will tables that have only contained a handful of records. However, when you have to work with tables with several hundred or thousands of records, effective navigation tools become essential. In this lesson you will become familiar with the most important table navigation aids, which can also be used in the same way when working with Forms. Deleting data When working with databases, you not only have to enter data, but also delete it. This lesson will show you the most important step for deleting records and data fields.
Tables Exercise 01 Tables Exercise 02 Relationships and indexes What would life be like without relationships? With a little imagination, this admittedly hackneyed pearl of wisdom can be applied to databases. To save on memory capacity and to improve the layout of a database, tables can be brought into a relationship with one another - database experts talk about 'relations'. In this chapter, you will learn what relations are and how to create them. Setting the Primary key Relationships (between tables) in relational databases are created using so-called key fields. If you want to create a relationship between two tables, all of the records have to be uniquely identifiable. This unique designation is possible using the Primary key. Creating an index You can index an individual field in order to find and sort records faster. Here, we will show you the fastest way to do this. 1:n Relationships with the Relationship window Relationships are of central importance to every database structure. Since most tables in a relational database require information from other tables, relationships need to created in order to logically combine that information. Referential integrity in 1:n relationships If a relationship is established between two tables, Microsoft Access connects the corresponding records on the basis of the equality of the values in the two key fields. If you would also like to specify that in the Foreign key of a table, only values may be entered that are already contained in the Primary key of the other table, then the relationship option Referential Integrity must be activated. Creating a 1:1 relationship In this lesson you will become familiar with the 1:1 relationship. This type of relationship is not as common as 1:1 relationships, but there are areas where the 1:1 relationship makes sense. Relationships and indexes Exercise 01 Relationships and indexes Exercise 02
Queries It is possible to make queries or requests in order to extract certain fields or data from a table. For example, a search criterion such as "Only Show Customers from Vienna" can be used as a filter. In addition, queries can be made within a combination of fields as well as using data from several different tables - this will all be explained in the course of the chapter. Creating Queries with the Wizard A truly powerful database is characterised by its ability to show exactly the data that you would like to see. A database provides concrete answers to questions such as: What are the names of all full-members? or Who has paid this year s membership fee? The following pages will show you how to create a select query with the Wizard. Creating queries in the design view Queries do not have to be created with the Wizard. They can also be created in the design view. This method is perhaps a bit more complicated, but it is also more flexible. Adding and deleting fields Queries that have already been created have to adapted to new requirements from time to time. This lesson will show you how to add fields to a query and how fields that are no longer required can be deleted. Defining criteria Criteria are used in queries to select and display a very specific set of records. It doesn t matter if the query consists of one or several tables, you can use the criteria introduced here with any of the queries created in this course. Criteria can also be comparative, i.e. the contents of a data field are compared with a certain term or value. There are also, however, calculated criteria whereby the result of a formula or function serves as the basis for the query result. Queries Exercise 01 Queries Exercise 02 Forms Forms can be regarded as windows through which others can see and access your database. The design of a form is therefore geared up to allowing other users to input and display data. An effective form speeds up the use of your database because users don't have to search for the required information. A visually appealing form not only increases efficiency, it makes working with the database more pleasant. Creating Forms with a single click Forms are an important component of a database and are suitable for numerous tasks such as the entry, display and editing of data. In this case, this is referred to as bound Forms, since the data is bound to a table or query. On the following pages, you will learn about the easiest and fastest way to create a Form in Access 2007. Creating forms with the Wizard You can create a form by yourself or let Microsoft Access do it with the help of the Form Wizard. The Form Wizard speeds up the creation of a form, because it takes over all of the basic work. When using the Form Wizard, Access asks you to answer questions and then creates the form on the basis of your answers.
Entering data into forms This lesson should provide you with an initial overview of data entry with forms. The data that you enter with the assistance of forms are saved in tables on which the form is based. This is usually done automatically by Access. However, you also have the option of saving a record manually. Opening forms in the design view After you have created a form using the 1-Click method or the Wizard, you can edit it in the design view. Every control element that is found in a form can be changed in its size and position. Numerous formatting options are also available to give the form an appealing layout. The layout view The Layout View is a new feature of Access 2007 and the most intuitive view for making changes to forms. In the layout view, the form is actually displayed so that the data look almost exactly the same as do when displayed in the form view. Since the data are shown when the form is being changed, this view is very helpful to see how changes made to the size of control elements or the execution of nearly any other design task affect the presentation and userfriendliness of the form. Formatting form elements You have already learnt that you can quickly format text and labels in the layout view. You demonstrated this by changing the font size and the format to bold. All of this and more is also possible in the Design View. This lesson will show you how to add, format and, when necessary, delete controls. Forms Exercise 01 Forms Exercise 02 filtering and searching In the course of this module, you have learnt about important database objects such as tables, queries and forms. The core skills of modern databases, however, also include sorting, filtering and searching for information. And it is precisely these skills that you will learn about in the course of this chapter! Sorting records When browsing through a form, if you would like to sort the records according to a specific field, you can make use of the Sort function. This allows records to be arranged in ascending or descending order. The sorting of records is an indispensable tool, which can also be applied to tables, in order to achieve a better overview of available data. Selection-based filtering of data A filter is an instruction which can be used to temporarily limit the number of displayed records. This restriction of the display to specific records is based on criteria that you, the user, have to set. Filters are particularly useful when only a certain group of data should be examined from a large amount of data. Searching for data Access 2007 provides navigation buttons in tables and forms that allow you to quickly jump to specific records, but these are only simple back and forward buttons. What about when you when you want to spontaneously jump to a record that contains certain text? This is exactly what the Find command is for.
Sorting, filtering and searching Exercise 01 Sorting, filtering and searching Exercise 02 Reports If you have successfully reached this point in the module, you may well consider yourself a database expert. However, one thing is still missing from your repertoire: the correct method of printing out data in a structured way. To help you print out data in all kinds of ways, Access offers you so-called 'reports'. In this chapter, you will learn how to sort data, group it and send it to your printer correctly formatted. Creating a report with a single click Reports are created in Access in order to print data or information. Similar to forms, simple reports can be created in Access 2007 with a single click. These are always based on a table or query and contain all of the data fields. In case you would like to make additional adjustments, you can revise the report in the design view. Creating reports with the Wizard The Report Wizard enables the targeted creation of a report. In this process, Access asks you to answer questions and then creates the desired report based on your answers. The report can then be revised in the design view. Opening reports in the design view (modify) After you have created a report with the 1-click method or with the Wizard, you can edit it in the design view. Every control that is part of the report can changed both in size and position. There are also numerous formatting options that can be used to give your report an appealing design. Formatting reports You do not always have to agree with the predefined layout provided by the Report Wizard. You can adapt a report to your individual needs at any time using, primarily, the normal formatting options such as fonts, font styles or the formatting of lines. Creating and headers and footers The page header and footer areas are displayed on every page of a report. They are therefore particularly well suited for the display of page numbers or the date and time. This lesson will provide you with an overview of the different methods available for automatically creating headers and footers in Access 2007. Grouping reports You can group a report according to several fields or expressions to add more structure to your report. In this lesson, we will show you the fastest way to do this in the design view! Adding calculated fields In reports, it is relatively easy to create calculations for groups or all of the records. Access 'knows', on the basis of the position of the calculated field, the range for which, for example, a sum should be calculated. Fields in the group footer area calculate groups, whereas fields in the report footer calculate all of the records in the report.
Reports Exercise 01 Reports Exercise 02 Printing objects As you are no doubt aware, Access reports are arguably the best way of printing out data. However, it is also possible to print out hard copies of other database objects such as tables, queries or forms. In the course of this chapter, you will learn how to do this and what you generally need to consider before starting the printing job. Print preparation In this lesson, you will learn about the preparations you should take for a smooth printing process. It doesn t matter whether you want to print reports, tables, forms or queries; the process is the same. Print Preview and Print When a report is printed, it shows the most current data from a table or query in a certain layout. However, before the actual printing, you should still check the layout and the number of pages in the report. If the display does not correspond with your wishes, you can make one or more changes in the Print Preview. Printing tables, queries and forms After the emphasis we placed in the previous lesson on reports, we will now turn our attention to the printing of the other database objects. However, most of the processes are the same or vey similar to the printing of reports. Printing objects Exercise 01 Printing objects Exercise 02 Exporting data A database such as Access normally provides all of the objects necessary for the entry, editing and analysis of data. Sometimes, however, it is necessary to covert certain data from tables or queries into a different format so that other target groups can analyse the data. This is referred to as exporting to a different format. Exporting tables or queries A database such as Access normally provides all the objects required for the entry, editing and analysis of data and information. Sometimes, however, it is necessary to put certain data from tables of queries in a different format to allow other target groups to analyse the data. This is referred to as the export into a different format.
Final test Here, you can evaluate what you have learned. Final test Here, you can evaluate what you have learned.