Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×

PPT On MS-Access 2007 | Full Concepts |

Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Próximo SlideShare
Ms access 2010
Ms access 2010
Cargando en…3
×

Eche un vistazo a continuación

1 de 40 Anuncio

Más Contenido Relacionado

Similares a PPT On MS-Access 2007 | Full Concepts | (20)

Anuncio

Más reciente (20)

Anuncio

PPT On MS-Access 2007 | Full Concepts |

  1. 1. Welcome to MS- Access 2007
  2. 2. Introduction Microsoft Access is a database management system. It allows information to be stored, organised and manipulated using a computer. A database is an organised collection of related information, such as a telephone directory. Information is held in a series of tables. The tables can be linked so that information in one table can be related to information in a second table. In order to get specific information from a database, you would run a query. A query interrogates tables looking for any information that matches specified criteria. Results of queries can be printed out using a report. A report allows you to present information in a well-formatted and clear layout. Data-input and querying can be made easier using forms. A form is a well laid out front end to the database that offers input fields for data or query criteria.
  3. 3. Starting Access 2007 Access 2007 is installed on the Managed XP Service. It is available on CD for people to install on personal computers. To start Access, click the Start button and select All Programs, then from the sub-menu, select Microsoft Office, then select Microsoft Office Access 2007. When Access starts you will see the Access window, the right-hand pane displays options for selecting files which you have recently worked on, and for creating a new database.
  4. 4. To begin work on a new database, click the Blank Database icon. You will need to create a new database file and will see the following appear in the lower-right corner of the screen:
  5. 5. The Ribbon The ribbon contains tabs relating to a specific task. Each tab contains several groups of tools; here the Views, Clipboard, Font, Rich Text and Records group are visible. Each group contains related buttons, menus and lists. Some groups have an arrow in the bottom right corner, which gives a dialog box when clicked.
  6. 6. Tables of Data Access holds data in tables. Each entry in the database is held as a record The individual details of each entry are held in fields. It is easiest to create a new table in Design view where you first define the fields that you will be using. From the initial screen, click the arrow below the View button, found in the Views group on the Home tab, and from the menu select Design View. A dialog box will require that you name the table, for now leave the default Table1 and click the OK button.
  7. 7. In the lower-right area, the grid at the top lets you define the field in the table; the grey area below lets you fine-tune each field. For the time being we will only consider the grid. First enter a name for the field in the Field Name column. The name can be long and include mixed case letters, numbers and spaces. You can overtype the ID field that was added automatically. Press the Tab key to move to the Data Type column. The majority of fields will hold text data and this will appear by default. If you click to reveal the menu however you will see the following list of data types available to you.
  8. 8. Text Suitable for small amounts of text such as names addresses Memo Suitable for large amounts of text such as descriptions or Number Numeric values (whole or fractional) that can be used in Date/Time Dates and times. Currency Monetary values. AutoNumber An automatic counter which automatically increments itself Yes/No True-or-false values. OLE Object Graphics or other binary information. Hyperlink Web page addresses. Lookup wizard Creates a list of acceptable values, covered later. for each record. and telephone numbers. abstracts. calculations.
  9. 9. In these notes we will construct a database of students registered for fictitious courses in a department. Below is the list of fields used in the first table. Each student has a unique registration number so this has been defined as the Primary Key. As the registration number begins with zero, and will not need to be counted, we have recorded it as a text field. Entering Data To begin entering data, click the View button, found in the Views group. If you have not already saved your table you will be required to do so now. When you enter Datasheet View you will see a table with a single blank row. The columns of the table will be labelled with the field names that you have defined. In the example database mentioned above you would see the following screen. Database
  10. 10. To add data to your own table, click in the first field and type the data. Use the right arrow or Tab key to move to the next field. When you have entered data for the final field in your first record, press the Tab key. The first record will be saved automatically, and a new row will be created for the second record. Continue this process for all records in your data, each record will be saved automatically. In our example database, the first table might look as follows
  11. 11. Querying the Database Having input a wealth of information into your database you can now begin to extract specific details of interest using queries. Any existing queries will be available under the Queries section of the left-hand column window. If you don’t see this, click the down arrow in the left-hand column and select Object Type from the menu. To run an existing query, simply double-click it. The query will run and the extracted data will be displayed on screen. To design a new query click the Create tab, then from the Other group, click the Query Design button. You will be offered a list of tables on which to base your query.
  12. 12. First we will consider a simple query, which is used to extract information from a single table in a database. Select the table of interest, then click the Add button. Click the Close button to remove this window. You will then enter the Query Design window containing your chosen table. Your table will be displayed in the upper pane with all its fields available. In the lower pane is an area to which you can add specific fields from your table. To add a field to the lower pane simply double- click its entry in the upper pane. For example, in our student database, the first table contains lots of details about the students. If we only need to know their names and email addresses, for a mailing list, we should double-click in turn the entries for Forename, Surname and Email. These fieldnames will appear in the lower pane.
  13. 13. To view the data in the query we need to switch to Datasheet View. Click the View button and the results of the query will be displayed in a table.
  14. 14. Types Of Queries 2.Complex Queries1.Fine-Tuning Queries Creating a Data Entry Form Typing data into a table is fine, but the fields are very close together and the screen becomes awash with data. For a more user-friendly method of entering data you can quickly and easily create a data entry form. To create such a form click the Create tab, then in the Forms group, click the More Forms button, then from the menu select Form Wizard. In the first window, choose the table you want to enter data into then click the >> button to include all fields in the form. Click the Next button. In the second window select Columnar layout and click the Next button. In the third window select the Office style and click the Next button. In the fourth window supply a name for the form and click the Finish button.
  15. 15. The tabular report will be generated. Below we have used the query that lists students attending a specified module. Use Page Setup from the File menu to alternate between Portrait and Landscape, and then use the Print button to print out your report.
  16. 16. Why use forms? In real life, a form is piece of paper you fill out so someone can collect and keep track of specific information about you. Only one record—your record—is captured with any given paper form.
  17. 17. A database owner wants to control the levels of access other database users have to the data; the fewer the amount of people who are interacting with the data, the lower the chances are of the data becoming compromised. Forms are one more way a database owner can limit the actions of other users. Form properties can be set so users can only enter records or just view records. Creating a form Access 2007 has several automatic tools for creating forms. These tools are located in the Forms group on the Create tab in the Ribbon, as seen below:
  18. 18. Access 2007 forms tools include: The Form command makes a basic form, showing a single record at a time. The Split Form command creates a form showing one record on top and includes the Datasheet view of the entire source table on the bottom. The Multiple Items command creates a form that shows all records at once, which looks similar to the source table in Datasheet view. The Form Wizard is hidden under the More Forms command. It walks you through the process of creating more customized forms.
  19. 19. To create a form using the Form command: The basic Form command is the one we suggest because it allows you to see just one record at a time. It also includes all of the fields in your source table for you, and you can modify the layout of the basic form to hide fields or add controls: Begin by highlighting the table you want to use as a source table. With the source table highlighted, select the Form command from the Forms command group in the Createtab on the Ribbon. The new form is created and opens in the object pane. The newly created form has the same name as the source table by default. You can give the form a new name by saving the form. You will be prompted to give the form a name.
  20. 20. Using forms to enter data Populating a database is easy once you have a basic form in place. Record navigation works the same way for forms as it does for tables. The navigation bar is located in the bottom-left of the object pane. The navigation buttonswork the same way as they do for tables. The picture below shows the navigation buttons for a form.
  21. 21. Creating Reports Reports organize and summarize data for viewing online or for printing. A detail report displays all of the selected records. You can include summary data such as totals, counts, and percentages in a detail report. A summary report does not list the selected records but instead summarizes the data and presents totals, counts, percentages, or other summary data only. Access has several report generation tools that you can use to create both detail and summary reports quickly. This lesson teaches you how to create reports. Use the Report Button The Report button creates a simple report that lists the records in the selected table or query in a columnar format.
  22. 22. To use the Report button: 1.Open the Navigation pane. 2.Click the table or query on which you want to base your report. 3.Activate the Create tab. 4.Click the Report button in the Reports group. Access creates your report and displays your report in Layout view. You can modify the report.
  23. 23. Tip: After you create a report, you can save it. 1.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. 2.Type the name you want to give your report. 3.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.
  24. 24. Understand controls Controls let you view and work with data in your database application. The most frequently used control is the text box, but other controls include command buttons, labels, check boxes, and subform/subreport controls. Controls can be bound, unbound, or calculated: Bound control A control whose source of data is a field in a table or query is called a bound control. You use bound controls to display values that come from fields in your database. The values can be text, dates, numbers, Yes/No values, pictures, or graphs. For example, a text box that displays an employee's last name might get this information from the Last Name field in the Employees table. Unbound control A control that doesn't have a source of data (such as a field or expression) is called an unbound control. You use unbound controls to display information, pictures, lines or rectangles. For example, a label that displays the title of a form is an unbound control.
  25. 25. Calculated control - A control whose source of data is an expression, rather than a field, is called a calculated control. You specify the value that you want to use as the source of data in the control by defining an expression. An expression can be a combination of operators (such as = and + ), control names, field names, functions that return a single value, and constant values. For example, the following expression calculates the price of an item with a 25 percent discount by multiplying the value in the Unit Price field by a constant value (0.75). =[Unit Price] * 0.75 An expression can use data from a field in the form or report's underlying table or query, or data from another control on the form or report.
  26. 26. What is a macro? A macro is a tool that allows you to automate tasks and add functionality to your forms, reports, and controls. For example, if you add a command button to a form, you associate the button's OnClick event to a macro, and the macro contains the commands that you want the button to perform each time it is clicked. In Access, it is helpful to think of macros as a simplified programming language that you write by building a list of actions to perform. When you build a macro, you select each action from a drop-down list and then fill in the required information for each action. Macros enable you to add functionality to forms, reports, and controls without writing code in a Visual Basic for Applications (VBA) module. Macros provide a subset of the commands that are available in VBA, and most people find it easier to build a macro than to write VBA code.
  27. 27. You create a macro by using the Macro Builder, which is shown in the following illustration.
  28. 28. On the Create tab, in the Other group, click Macro. If this command is unavailable, click the arrow beneath either the Module or the Class Module button, and then click Macro. You use the Macro Builder to build the list of actions that you want to carry out when the macro runs. When you first open the Macro Builder, the Action column, the Arguments column, and the Comment column are displayed. Under Action Arguments, you enter and edit arguments for each macro action, if any are required. A description box that gives you a short description of each action or argument is displayed. Click an action or action argument to read its description in the box. The following table shows the commands that are available on the Design tab of the Macro Builder.
  29. 29. Sorting records When you sort records, you are putting them into a logical order, with similar data grouped together. As a result, sorted data is often simpler to read and understand than unsorted data. By default, Access sorts records by their ID numbers. However, there are many other ways records can be sorted. For example, the information in a database belonging to a bakery could be sorted in a number of ways: Orders could be sorted by order date or by the last name of the customers who placed the orders. Customers could be sorted by name or by the city or zip code where they live. Products could be sorted by name, category (like pies, cakes, and cupcakes), or price. You can sort both text and numbers in two ways: in ascending order and descending order. Ascending means going up, so an ascending sort will arrange numbers from smallest to largest and text from A to Z. Descending means going down, or largest to smallest for numbers and Z to A for text. The default ID number sort that appears in your tables is an ascending sort, which is why the lowest ID numbers appear first.
  30. 30. To create a simple Sorting Like This:
  31. 31. Filtering records Filters allow you to view only the data you want to see. When you create a filter, you set criteria for the data you want to display. The filter then searches all of the records in the table, finds the ones that meet your search criteria, and temporarily hides the ones that don't. Filters are useful because they allow you to focus in on specific records without being distracted by the data you're uninterested in. For instance, if you had a database that included customer and order information, you could create a filter to display only customers living within a certain city or only orders containing a certain product. Viewing this data with a filter would be far more convenient than searching for it in a large table.
  32. 32. To create a simple filter Like This:
  33. 33. End Of This Moment

×