Z
Zippy the Pinhead
I have a form with a subform. On the subform, the user selects from a
list of items using a combo box.
THe subform is based on a query which is based on a details table.
The primary key from the main form's table and the primary key of a
table from which the row source for the combo box comes make up the
multi-field primary key for a two-field detail table. THe combo box's
"limit to list" property is true.
So far so good. But when a user mistakenly selects from the list and
tries to backspace over the entry, or in any other manner to undo the
addition to mistaken addition to what will become the entry in the
detail table, the thing falls apart with an error message about
attempting to place a null value into a primary field key.
How can I enable the user to undo a mistaken selection from a combo
box without triggering the error message and ultimately exiting
without saving the data entered into that instance of the form?
Thanks in advance.
list of items using a combo box.
THe subform is based on a query which is based on a details table.
The primary key from the main form's table and the primary key of a
table from which the row source for the combo box comes make up the
multi-field primary key for a two-field detail table. THe combo box's
"limit to list" property is true.
So far so good. But when a user mistakenly selects from the list and
tries to backspace over the entry, or in any other manner to undo the
addition to mistaken addition to what will become the entry in the
detail table, the thing falls apart with an error message about
attempting to place a null value into a primary field key.
How can I enable the user to undo a mistaken selection from a combo
box without triggering the error message and ultimately exiting
without saving the data entered into that instance of the form?
Thanks in advance.