Updating combo boxes

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

Guest

My user wants a form with many combo fields. They want to add to the combos
whenever necessary. In the past I would create a form that activated on
double click. It displayed just that field as a datasheet, the user could
add the new info at the bottom and upon closing refresh the form. However, I
don't want to create ten forms for each combo field. Then I encountered a
program that had combo boxes that whenever you typed data that was not on the
list a msgbox appeared to ask if I wanted to add this to the list. Selecting
YES added it. I've messed with this a couple of days now and can't seem to
figure out how that was done. Anyone ever do this in their forms.
 
If you are storing unique entries for a combobox in a separate table, the
procedure you describe is available in the Access Help under NotInList.

Another option is to set the rowsource for the combobox to a SQL statement
like this:
SELECT DISTINCT MyField FROM MyTable
where MyTable is the recordsource for the form.
You can set the LimitToList property to False - then you'll be able to just
type a new value into the combobox, but you'll also be able to click and see
all previous entries.

HTH
 
Back
Top