![]() |
The Records of a Table |
|
Regular Data Entry |
|
Introduction |
|
To perform data entry on a table, you can click a cell under a column header and (or select) a value. Although a table appears with many rows of cells, when a table is empty with no record, only the cells just under the column header are accessible. Those cells appear with a light-blue color. If you click one of those cells, its background becomes white and its borders are orange, indicating that it is ready: |
|
Another way to indicate an empty record, the field of the most left column is marked with (New) and its row of records uses the same light-blue color. After typing data into a cell, you can press Enter or Tab to move the caret to the next cell. In many circumstances you will also be able to move to the next cell by pressing the right arrow key. Sometimes you can move to the next record even if the current record is not completed. In this case, you could press the down arrow key. When a record has been completed, the background color of its cells changes. The next record under it has the first cell marked as (New) and its empty cells are in light-blue. The other cells remain white:
The white cells cannot receive data: if you click them (with
the left mouse button), nothing happens. You can only right-click them to get a
context-sensitive menu.
Record maintenance consists of copying, pasting, or deleting records, etc. Some of the operations you will perform on one or more records on a table require that the record(s) be selected first. To select a row or record in Datasheet View, click the desired row header.
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. 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:
If a record is not needed anymore or has become irrelevant in a table, you can delete it. To do this:
In both cases, a message box would come up to warn you. If you find out you were making a mistake, you can click No. If you still want to delete the record, click Yes. You can use this same approach to delete more than one record.
If you have a list of records from one table and you want to use those records in another table, you can copy the records from one table and paste them in another table. You have various options. You can copy the values of a column from one table and paste the values in another column. Both columns should be of the same type. That is, you should not attempt to paste the names of people in a column of a Boolean type (a Yes/No column that display check boxes). You can also copy and paste many columns. When selecting the columns, they should be selected in a range. After selecting and copying, you can paste the values in a range of columns of another table. The columns from the originating table and the range of columns from the target table must be of the same type. That is, the first column in each range must be of the same type; the second column of both ranges must be of the same type, and so on. You can also copy a whole record or a range of columns. First select the range of records. Then, either right-click the selection and click Copy, or press Ctrl + C. You can then paste the records in another table.
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.
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:
To start looking for a value, you can click the Find button
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.
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
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. |
|
|
||
| Home | Copyright © 2008 FunctionX, Inc. | |
|
|
||