OnNotInList Macro

S

Shandycat

Access 2002: I have a combo box on a form from which to
select data in a table. I want to be able to add an entry
to the table if it's not already in the list. HELP tells
you to run a macro on the "On Not In List" event/property
on the combo box which will let you add the new entry to
the table, but it doesn't tell you what kind of action to
use in the macro. Any advice? I don't remember it being
this complicated in earlier versions.
 
J

Jim/Chris

It depends on how much information needs to be entered when
the name is not in the list.
For example
I have a table listing all the staff in my department.
This table contains name, email address and telephone
number. If the person is not in the combo box list he
needs to be added to this table. The person is required to
add name, email address and phone number. All 3 fields are
required information. When they are done the form is
closed and they are back to the main form and the combo box
is refreshed.

So My macro that is run in the NotOnList event is
open form

I have another macro(or code) the refreshes the combo box
when the add new staff form is closed

Does that help

Jim
 

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