Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 6: Working with Datasheet View


223


When adding or editing records, you might see three different record pointers:

l Record being edited: A pencil icon

l (^) Record is locked (multiuser systems): A padlock icon
l New record: A pencil icon
Caution
If the record contains an AutoNumber field, Access shows the name (New) in the field. You can’t enter a
value in this type of field; instead, simply press the Tab or Enter key to skip this field. Access automatically puts
the number in when you begin entering data.
Saving the record
Moving to a different record saves the record you’re editing. Tabbing through all the fields, clicking
on the Navigation buttons, clicking Save in the ribbon’s Record group, and closing the table all
write the edited record to the database. You’ll know the record is saved when the pencil disappears
from the record selector.
To save a record, you must enter valid values into each field. The fields are validated for data type,
uniqueness (if indexed for unique values), and any validation rules that you’ve entered into the
Validation Rule property. If your table has a primary key that’s not an AutoNumber field,
you’ll have to make sure you enter a unique value in the primary key field to avoid the error mes-
sage shown in Figure 6.6. One way to avoid this error message while entering data is to use an
AutoNumber field as the table’s primary key.
FIGURE 6.6
The error message Access displays when attempting to save a record with a duplicate primary key value
entered into the new record. Use an AutoNumber field as your primary key to avoid this error.
Tip
The Undo button in the Quick Access toolbar reverses changes to the current record and to the last saved
record. After you change a second record, you can’t undo the saved record.
Tip
You can save the record to disk without leaving the record by pressing Shift+Enter.

Free download pdf