Home

The Records of a Database

 

Data Entry in Table Datasheet View

 

Introduction

The values of a table are organized in horizontal segments or rows called records. After creating the columns whether in Datasheet View or in Design View, there are various ways you can create its records. To assist you, a table is equipped with small boxes called cells under each column. You can enter the necessary values in those cells. To do this, click a cell under a column:

Data Entry

And type the desired value in it. You can continue with the cells on the left and right to complete a record:

Record Selection

Before selecting a record, you must display the table in Datasheet View:

  • To select a record, click the desired row header
     
    Record Selection
     
    Record Selection
  • To select more than one record, click and hold your mouse on one of them, then drag to cover the other desired row or rows. When all desired rows are highlighted, release the mouse. Another technique used to select more than one row consists of clicking one row that will be at one end, pressing and holding Shift, and then clicking the row that will be at the other end
     
    Record Selection
  • To select all records of a table, you can press Ctrl + A or you can click the button at the intersection of the column headers and the row headers
     

     

Record Deletion

If a record is not needed anymore or has become irrelevant in a table, you can delete it. To do this:

  • You can click a row header and press Delete
  • You can right-click a row header and click Delete Record
     

You would receive a warning message.

Copying/Pasting Records

You copy records from one table and you paste them in another table. To copy the values under a column, right-click its column header and click Copy:

To paste, right-click the target column in the same table or another table and click Paste:

Pasting Records

In the same way, you can copy the values of more than one column and paste them where needed

Pasting Records

 

Data Entry on a Form

 

Introduction

Besides, or instead of, the table, you can create records on a form, which is in fact more convenient. To create a record, open the form in Form View. You can navigate to a new record or click the New Record button . Then click each box and add the desired value.

Finding and Replacing Data

 

Editing Data

Editing a value consists of changing it. This can be done on the table or the form (or on a query as we will learn in Lesson 20). To do this, first locate the value in the field. If you are working on a table, you can click the value and use the keys (left, right, Home, End, Backspace, or the Space Bar) to edit the value. If you are working on a form, you can click the label next to a field. This would completely select the corresponding value in the control. You can then press F2 to position the caret in the control and edit its value. Alternatively, you can click the control's field and edit the value.

Practical Learning: Editing Data

  1. From the resources that accompany these lessons, open the Ceil Inn5 database
  2. In the Navigation Pane, double-click Customers: Table to open it
  3. In record number 2, click the empty box under Emergency Name
  4. Type Albert Lomey and press Enter
  5. Close the table
  6. In the Navigation Pane, under Customers: Table, double-click Customer to open the form
  7. Click the Next Record button once to navigate to the second record
  8. Click the Emergency Name label and type 301-412-5055
  9. Close the form

Finding Data

Sometimes there will be some regular problems in your database. For example during data entry, some information could be missing, mistyped, or entered in the wrong field. These problems would be easy to locate on a small table or form. If the database grows, values could become difficult to locate. Fortunately, Microsoft Access provides many tools you can use to find values and take actions.

To assist you with finding a value in a table or a form, the Home tab of the Ribbon is equipped with a section named Find:

Finding Data

Find

To start looking for a value, you can click the Find button Find or you can press Ctrl + F. This would open the Find and Replace dialog box with the Find tab selected:

The Find and Replace dialog box is modeless, meaning you can access the table or form in the background while the dialog box is present.

To specify the value to look for, type it in the Find What combo box. If you had previously used the dialog box, the Find What combo box keeps track of the previous searches and stores them in the control. This would allow you to perform a search on a value previously used.

The Look In combo box allows you to select the column where the value should be located. By default, when the Find and Replace dialog box displays, it selects the column or field that had focus and puts its name in the Look In combo box. You can look into that column but, if you want to search the whole table, select its name in the Look In combo box.

The Match combo box allows you to specify how close the match should be. The options are Any Part of Field, Whole Field (the default), and Start of Field.

The Search combo box allows you to specify the direction to follow. The options are Up, Down, and All (the default).

After specifying the options, you can click Find Next. After using the Find and Replace dialog box, to dismiss it, you can click Cancel or press Esc.

Practical Learning: Editing Data

  1. The Ceil Inn5 database should still be opened.
    In the Navigation Pane, double-click Customers: Table to open it
  2. In the Find section of the Ribbon, click the Find button Find
  3. In the Find What combo box, type Carney
  4. In the Look In combo box, select Customers
  5. In the Match combo box, select Any Part of Field
     
  6. Click Find Next
  7. Click Find Next again. Notice that a second result is found
  8. In the second result, while the Find and Replace dialog box is still opened, on the table, click the found Carney and press Tab three times to get to its Emergency Phone
  9. Press F2 to position the caret in the cell and edit it to display 990-326-5144
  10. In the Find and Replace dialog box, replace Carney with Beckins
  11. Click Find Next.
    Notice that the Phone # of that record is incomplete
  12. Click the right side of the incomplete telephone number and type 1440 to make it 410-944-1440
  13. Click the Find and Replace dialog box

Replacing Data

We have seen that you can use the Find and Replace dialog box to simply locate a value. Instead of just finding it, you may want to replace the found value with an alternate. To assist you with this, you can use the Replace section of the dialog box. To get it, in the Find section of the Ribbon, you can click the Replace button Replace or you can press Ctrl + H. This would open the Find and Replace dialog box with the Replace tab selected:

Replace

You can also open the Find and Replace dialog box as we did for finding, then click the Replace tab.

The Replace section of the dialog box provides the same options at the Find counterpart with the addition of the Replace With combo box, the Replace and the Replace All buttons. After specifying what to look for in the Find What combo box, the Replace With combo box allows you to specify the value to replace the Find What with.

Practical Learning: Editing Data

  1. The Ceil Inn5 database should still be opened.
    In the Navigation Pane, double-click Customers: Table to open it
  2. In the Find section of the Ribbon, click the Replace button Replace
  3. In the Find What combo box, type ratner
  4. In the Replace With combo box, type Rattner
  5. In the Look In combo box, select Customers
  6. In the Match combo box, select Any Part of Field
     
    Replace
  7. Click Find Next
  8. Once the value is found, click Replace
  9. Close the Find and Replace dialog box and close the table
  10. In the Navigation Pane, under Customers: Table, double-click the Customers form
  11. Press Ctrl + H to display the Replace dialog box
  12. In the Find What combo box, replace the string with Annie and press Tab
  13. In the Replace With combo box, type Annette
  14. Make sure the Look In combo box displays Customers and make sure the Match combo box is set to Any Part of Field.
    Click Find Next
  15. Once a match is found, click Replace All
  16. Click the right side of the incomplete telephone number and type 1440 to make it 410-944-1440
  17. Close the Find and Replace dialog box and close the form

Introduction to Record Printing

 

Table Printing

The primary function of the table is to provide a means of storing and arranging information of a database. Nevertheless, you can print data of a table, especially if for example you are in a hurry and do not have access to another object. You can print data on a table whether the table is opened or not.

To print a closed table, locate it in the Navigation Pane and click it to select it, then click the Office Button, position the mouse on Print and select one of the three options. In the same way, if the table is opened in Datasheet View, click its tab to give it focus, then click the Office Button -> Print and select to print or to preview.

The Print menu of the Office Button presents three options:

  1. If you click Print, the Print dialog box would be presented to you. It allows you to specify the printer you want to use. Most of the time, the Name combo box will present the default printer; otherwise, you can select one:
     

     
    After specifying the printer, if you are ready to print, you can click OK. To customize the printing job, you can click Properties. A dialog box, whose contents depend on the selected printer, would come up. Among the various options you would have is that of specifying the orientation of the paper (Portrait or Landscape). Again, remember that different printers provide different features. Here is an example of the Properties of a printer that would allow you to print on both sides of the paper:
     
    Printer Properties
     
    After setting the properties of the printer, you can click OK. Once you are ready to print, you can click OK on the Print dialog box to send the job to the printer
  2. If you select Quick Print from the Print menu of the Office Button, the print job would be sent directly to the printer. Microsoft Access would use the default printer that is set in Control Panel and would use the previous settings that were set on that default printer
  3. If you select Print Preview, Microsoft Access would draw a print job on the screen for you. This allows you to see what the final job would look like on the paper. The characters on the screen may appear too small for you. To zoom in, you can click the middle of the window. To zoom out, you can click it again. Once you are ready to print, on the ribbon and in the Print section, you can click Print. This would send the print job to the printer

Practical Learning: Printing Tables

  1. In the Navigation Pane, click Customers: Table to select the table
  2. To print data from the table, click the Office button, position the mouse on Print and click Quick Print
  3. From the Navigation Pane, double-click the Company Assets table to open it
  4. Click the Office Button, position the mouse on Print and click Print
  5. Select the desired printer Name combo box and click Properties
  6. Based on your printer, select the Landscape radio button (usually in the Orientation section of a Paper Layout tab) and click OK
  7. On the Print dialog box, click OK
  8. Close the table

Form Printing

Although not part of their primary role, forms provide a quick means of printing data, especially in the absence of desired reports. There are various issues related to printing forms, including printing all records or just some of them.

You can print a form without opening it. Once you know the form you would like to print, locate its name in the Navigation Pane and use the same steps reviewed for a table.

When a form is opened, you have the option of printing all of its records or the selected one. In the Form View, to print just one record, navigate to the record you would like to print, click the Form Selection bar to select the record and proceed to print.

Practical Learning: Printing Forms

  1. From the Navigation Pane, under Customers: Table, double-click the Customers form to open it
  2. Click the Office Button, position the mouse on Print and click Quick Print
  3. To navigate to the 3rd customer, click the Next Record button twice
  4. Click the Office Button -> Print -> Print
  5. On the Print dialog box, click the Selected Record(s) radio button
  6. Click OK
  7. Verify that only the displaying customer's record was printed
  8. Close the Customers form
  9. Open the Cruise2 database you were working on earlier
  10. In the Navigation Pane, under the Cabins: Table, double-click Cabins
  11. We will print records from 3 to 7.
    Click the Next Record button Next Record twice navigate to record number 3
  12. Click the Record Selector bar
     
    Cabins
  13. Press and hold Shift. Click the Next Record button Next Record four times to display the seventh record where the Cabin ID field would display 7 (even though the record # still displays 3)
  14. Release Shift
  15. On the ribbon, click the Office Button -> Print -> Print
  16. On the Print dialog box, click the Selected Record(s) radio button and click OK
  17. Verify that records from 3 to 7 have been printed
  18. Close the Cabins form

Reports Fundamentals

 

The Report Wizard

A report provides an object used to print a database's records. Although you can print tables or forms, reports are customized to be printer friendly. They can perform and display calculations. Once again, Microsoft Access provides wizards to quickly create reports.

Microsoft Access can help you quickly create a report using one of the pre-designed layouts. This is done using the Report Wizard. The Report Wizard is available from the Reports section of the Create category of the ribbon.

Practical Learning: Using the Report Wizard

  1. On the ribbon, click Create
  2. In the Reports section, click Report Wizard.
    If you receive a Microsoft Office Access Security Notice, read it and click Open
  3. On the first page of the wizard, click the arrow of the Tables/Queries combo box and select Table: Cabins
  4. Click the Select All Fields button 
  5. Click Next
  6. Accept anything in the second page and click Next
  7. Accept anything in the third page and click Next
  8. In the Layout section, click the Columnar radio button:
     
    Report Wizard
  9. Click Next
  10. Select the Office style and click Next
  11. Accept the suggested Title of the report as Cabins and press Enter
     

Report Printing

The report is the favorite object used to print data. As done with the other objects, you can print a report whether it is opened or not. Before printing a report, you must first select or open it. If you want to print a report without opening it, in the Navigation Pane, locate the desired report and click it to select it. Then, proceed from the Office Button as we reviewed for the table and the form. In the same way, you can first open the report from the Navigation Pane and use the Print menu from the Office Button the same way we described for the other objects.

 

 

 

 

 

Home Copyright © 2008-2012 FunctionX