I've got an app with LOTS of combo boxes, which all need not in list coding. For most of them I want to
1-grab the newdata and throw it into a table using a recordset
2-then open a form on that table for addition of more data that the user probably has available at the same moment.
3-after he closes the form, requery and return him to his original forms with no error messages.
I can do all that, of course, locally. But I'd like to build a generic notinlist function tha would work
-initially, for all combo boxes on one form, all tables
-ultimately, from a separate module for ALL forms, all tables.
I can't seem to get the references right to create the broader function. It's going to have to receive the tablename (to feed to the recordset definition), and the fieldname for the recordset to accept newdata into. And: as long as my function has "notinlist" in its name (?), it seems to know enough about what it's going to do to insist on having newdata and response passed to it...tho I won't have them to pass until the local not-in-list event occurs.
Did I make that clear? At least, as I'm figuring it, when the local/actual cbo box's notinlist event occurs (so that code's gotta be there, and it'll have the newdata and response variables), I immediately want to call the public function, adding table name and fieldname ... and probably, finally, a formname open!)
Surely somebody's done this???????? either at the form or the global level.
For what it's worth, all data involved in the combo boxes is string data.