one NotInList function for multiple combo boxes?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

There are multiple forms in my app, and many of them have combo boxes that
have both a "Combo_NotInList" function (prompts the user when they attempt to
enter an item not in the list) and a "Combo_DblClick" function (if the user
knows in advance they want to enter a new item). In reviewing my code, I've
noticed that most of the "Combo_NotInList" functions are identical and most
of the "Combo_DblClick" functions are identical, except for the underlying
table that gets updated if the user desires to add an entry to whatever combo
box.

All of the functions are private, and in the module attached to the form the
combo boxes appear on. Is it possible to write one generic "Combo_NotInList"
function and one generic "Combo_DblClick" function for all the combo boxes,
and put it in the module with other public functions? If so, what should the
formal arguments look like and what passing mechanism should I use?

Thanks!
 
If you want to use the combo's NotInList event to add new values to the
table, see:
Adding values to lookup tables
at:
http://allenbrowne.com/ser-27.html

The example shows how to pass a reference to the combo and the NewData, and
return a value to assign to Response.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
Back
Top