ACC: Cannot Change Combo Box Value If ControlSource Property Is Set to AutoNumber Field (95450)
The information in this article applies to:
- Microsoft Access 1.0
- Microsoft Access 1.1
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q95450 Novice: Requires knowledge of the user interface on single-user computers.
SYMPTOMS
If the ControlSource property of a combo box is set to a field that
has an AutoNumber data type (or Counter in versions 1.x and 2.0), when you
try to change the value in the combo box, you receive the following message
on the status bar:
In Microsoft Access 7.0 and 97
Control can't be edited; it's bound to AutoNumber field <field
name>.
In Microsoft Access 1.x and 2.0
Control can't be edited; it's bound to Counter field <field name>.
CAUSE
The control source of a combo box is a table field where Microsoft Access
writes your combo box selection. By design, modifications to an AutoNumber
field are not allowed. Therefore, if the ControlSource property of a combo
box is set to an AutoNumber field, Microsoft Access cannot update the value
in the AutoNumber field; therefore, you cannot change the combo box value.
Microsoft Access gives you the message to tell you why it cannot update the
combo box control.
RESOLUTION
Either change the data type of the field in the ControlSource property
of the combo box, or set the ControlSource property to a field that does
not have an AutoNumber (or Counter) data type.
REFERENCES
For more information about combo boxes, search on "combo boxes," and then
"Binding columns to fields" using the Microsoft Access 97 Help Index.
Modification Type: | Major | Last Reviewed: | 5/9/2003 |
---|
Keywords: | kberrmsg kbprb kbusage KB95450 |
---|
|