Troubleshoot editing data in a field in Datasheet or Form view
Nothing happens when I try to edit data.
There are several kinds of fields in forms or datasheets that you can't edit. The following fields display values just as regular fields do, but if you try to enter data into them, nothing happens:
- AutoNumber fields If a field in a Microsoft Access database
has an AutoNumber data type or in a Microsoft Access project has a numeric data type with the Identity property set, Access automatically assigns a number to this field for each record you add. This type of field is often used as a record ID number or primary key. When you start adding a new record, Access automatically fills in the field's value for you and you can't edit it.
- Calculated fields In an Access database, a calculated field displays values that Access calculates. They are usually based on other fields in your tables, but calculated
field values are not stored in tables.
- Locked or disabled fields If a control on a form has the Locked property set to Yes or the Enabled property set to No, you can't edit the data in the field.
- Fields in a locked record If you use an Access database in a
multiuser
environment and a record is locked by another user, you can't edit the data in the record. When you move to a locked record, the locked record indicator
is displayed in the record selector.
- Fields in snapshots While most queries
return recordsets that you can edit, some queries return snapshots, which can't be edited.
- Fields in a read-only form or a locked database
If the form you're using has the AllowEdits property set to No or if the underlying data is read-only or locked by another person, you can't edit data in the form.
After
I've added or edited data, I receive a message and I can't move to another field or record.
When you try to move out of a field after changing data, Microsoft
Access validates the data, making sure that the value you entered is allowed in
that field. If the value isn't allowed, Microsoft Access alerts you. In order to
move off the field, you must either change the data to an acceptable value or
undo your changes. If the record
can't be saved, you must either make any necessary corrections or click Undo
to cancel all changes you made to the record.
A value might not be allowed in a field for the following reasons:
- The value isn't compatible with the field's data type.
If you enter a value that doesn't match the data type, Microsoft Access attempts
to convert the entry to the correct data type. However, some data can't be
converted to other data types. For example, you can't store a name in a field
with the Number data type in a Microsoft Access database
or the smallint data type in a Microsoft Access project.
- You may be having problems entering dates in a field with the Date/Time
data type. If you are entering dates using the slash mark (/) format, don't enter a
trailing slash mark. For example, entering 1/3 is valid, but 1/3/ is not
valid.
- The data breaks a rule set in the ValidationRule property for the
field.
- Data is required in the field, and you've tried to leave it blank.
- The validation macro specified for the BeforeUpdate property canceled
the update.
- The field does not accept zero-length strings. In an
Access database, you can only enter a zero-length string
in a Text or Memo field whose AllowZeroLength
field property is set to Yes.
In an Access project, you can only enter a zero-length string in a field with the varchar or nvarchar
data type in a Microsoft SQL Server 7.x database. Zero-length strings are not
supported in SQL Server 6.5.