ACC: Can't Change Combo Box Value If ControlSource AutoNumberID: Q95450
|
Novice: Requires knowledge of the user interface on single-user computers.
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>.
Control can't be edited; it's bound to Counter field <field name>.
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.
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.
Table: MyTest
------------------------
Field Name: MyAutoNumber
Data Type: AutoNumber (or Counter in Microsoft Access 1.x and 2.0)
Field Name: MyData
Data Type: Number
Field Name: MyBucket
Date Type: Number
Combo Box:
ControlSource: MyAutoNumber
RowSource: MyTest
For more information about combo boxes, search on "combo boxes," and then "Binding columns to fields" using the Microsoft Access 97 Help Index.
Keywords : kberrmsg kbusage FmsCmbo
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: March 19, 1999