Adding Items to a Combo Box through the Double Click Event
This sample demonstrates the use of the Not In List and On Double Click events of a combo box to firstly notify the user that the item they have attempted to enter is not in the list and that they should Double Click the Combo box to add that item.
As a modification of the usual double click event, the code in this sample collects the value that the user tried to enter and passes that value to the data entry form that is opened to allow the addition.
Further modification of the code and the use of a Public Variable pushes the newly entered item back to the combo box. Essentially simplifying the task of adding and selecting a new value in the combo box.
Note: In the event that the user enters multiple new records the code will simply push the last entered value back to the combo, and in the event that the user tabs to a new record prior to closing the data entry form, no value is pushed back to the combo.
The code is fully explained within the code Comments.
...but they're only monkey boys!!!
Last edited by John Big Booty; 09-14-2011 at 01:34 PM.