Modifying data tables (I)
Here we will see the record editing techniques used to modify a table definition as well as the data introduced into it.
|Modifying the design of a table.
If we wishmake an alteration in the definition of an existing table (e.g to add, extend or delete an existing column etc…) we need to make a modification in its design.
Open the database where the table we want to modify is found if you are not already there.
Select the table that you want to modify by clicking on it so that its name stands out.
Click on the Design button in the database window.
The Table Design window studied in the previous unit will appear.
To modify a field design, position the cursor over the field to modify, and perform the necessary substitutions.
To add a new field,
go to the end of the table and type in the new field definition.
situate yourself in an already existing field and click on the button in the Table Design bar, in this last case the new field will be inserted before the one in which we are positioned.
To delete a field,
position yourself in the field and click on the button in the Table Design bar.
select the whole row corresponding the field by clicking on its extreme left, and when it stands out press the Del key.
The field, as well as the data stored in it will be erased from the table.
And lastly, save the table.
To practice these operations you can perform the Step by step Exercise Modifying the table design.
|Introducing and modifying data in a table.
To introduce data into a table we can choose:
– In Database window, select the table to fill in by clicking on its name and click on the button to open the table.
– In Database window, double click on its name.
– If you are in Table design window, click on the Datasheet button in the Table design bar.
In all three cases the Datasheet window will appear:
Each rows allow us to introduce a record.
Write the value of the first field of the record.
Press ENTER to go to the next field in the record.
Once we have finished introducing all data in fields in the first record, we press ENTER key to introduce the data in the second record.
The moment we change to a different record, the record that we were in will be stored, and it is therefore not necessary to save the records again.
Click on the Close button in the Datasheet window to conclude this table.
If we want to delete an entire record:
Select the record to eliminate by clicking on the box on its extreme left (named record selector).
The record will remain selected.
Press the DEL key on the keyboard or on the button on the Datasheet bar.
Is we need to modify an inserted value all we need to do is situate ourselves over the value and re-tyte it.
If we need to alter something in the tables’ structure, we will need to go to Design view by clicking on the button on the Datasheet bar.
To practice these operations you can perform the Step by step Exercise Introduce data.
|Moving within a table.
To move around the various records contained in a table we can use the Navigation buttons:
The bar indicates to us which record we are in and the total number of records in the table.
The current record is indicated in the white box.
In the final number where we see of 3, the total number of records is indicated to us.
By clicking on the different buttons we can perform the operations explained next:
to go to the first record in the table.
to go to the previous record in the table.
to go to the next record in the table.
to go to the last record in the table.
To create a new record that is automatically situated at the end of the table.
We can also go directly to a determined record in the following way:
Double clic in the white box where the current record number is situated.
Write the number of the record we want to go to.
We can also move around the different fields and records by pressing the ARROW UP, ARROW LEFT, ARROW DOWN, and ARROW RIGHT keys on the keyboard.