C
Curt Gough
I have a combo box on a subform with a query rowsource. The rowsource
includes an ID field and a Name field. The control source of the box is the
ID field in an underlying table. Users select a name using the combo box.
There are instances when the user tries to delete the entry by deleting the
selection in the box. This brings up an error that states "You tried to
assign the Null value to a variable that is not a Variant type". I have
instructed the users to not delete that way and have showed them the proper
way. However, I would like to trap for the error just in case they do try to
use that method. I have placed code in the NotInList, AfterUpdate,
BeforeUpdate events that if the combo box is Null display a message. But
none work. Does anyone have a suggestion as to how that error can be
trapped?
Thanks.
includes an ID field and a Name field. The control source of the box is the
ID field in an underlying table. Users select a name using the combo box.
There are instances when the user tries to delete the entry by deleting the
selection in the box. This brings up an error that states "You tried to
assign the Null value to a variable that is not a Variant type". I have
instructed the users to not delete that way and have showed them the proper
way. However, I would like to trap for the error just in case they do try to
use that method. I have placed code in the NotInList, AfterUpdate,
BeforeUpdate events that if the combo box is Null display a message. But
none work. Does anyone have a suggestion as to how that error can be
trapped?
Thanks.