Dropdown: easy way to detect if item is in the list?

A

A C

Hi

Is there an easy way (eg property) for dropdown boxes to determine if the
user entered a value already in the list? The user is permitted to select
existing items in the list OR type new ones. Limit to list is false.

If the user starts typing and the autofill gives them the entry they want,
OR if they select the entry using the dropdown and selects the item I would
like a quick way to know. I am wanting to avoid having to write an after
update query to go looking for that entry to tell me if it is new.

Another question. The drop box has 5 or so columns. If the user types a
new entry into the drop box, what values does Access give to the other 4+
columns, are they null?

Thanks in advance
AC
 
G

Guest

If a user enters a value that is not in the list, the NotInList Event will
fire, so your reall don't have to do anything if they select an item in the
list other than the usual code to make the record referenced by the combo box
the current record.

The combo box does not have an entry in the list for new items until your
put them where the rowsource for the list is and requery the combo, so none
of your columns will have any value.

The purpose of the NotInList event is to allow you to take the action you
need to add the new data for the list.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top