Combo Box

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

Guest

I have a combo box on the main form enabling the user to select a specific
occupation which is linked to a the row source Table in properties. The
user can type in an occupation if it is not on the combo list. What I want
is for the user to have the option of adding this new occupation
automatically to the combo list.
Thanks for any help
 
If the value being typed into to the combo actually goes into the primary
key field of the lookup table (the list of occupations), you can use the
NotItList event of the combo, as explained here:
NotInList: Adding values to lookup tables
at:
http://allenbrowne.com/ser-27.html

But if this table has an AutoNumber primary key, so the new data is not the
value being stored, you will not be able to use NotInList. Instead, undo the
combo, and use another approach, such as executing an append query and
requerying the combo, or opening a form where the user can enter the value
and in its Form_AfterUpate event requery the combo.
 
Back
Top