autoexpand or add concatenated name

C

CuriousMark

I need help with designing a combo box to select or add names to a database.
I understand how the autoexpand feature works, and how to code for a
concatenated name (lastname, firstname, MI). But how do I code so that the
user can start typing in a name, and if the name is in the database already,
select it; if the name is not, then add it? I want to be able to add the
lastname, firstname and MI. Thanks.
 
A

Allen Browne

The simplest solution will be to place a little command button beside your
combo. The button opens the form where a new person can be added. The
AfterUpdate event procedure of that form (not control) requeries the combo
on the original form.

If you want to do it all at once, this article discusses your options:
Adding values to lookup tables
at:
http://allenbrowne.com/ser-27.html
But I think you will find it messy to try to assign multiple fields and get
the new ID value and get it into the combo accurately and reliably all in
its NotInList event.
 
C

CuriousMark

Thanks. I'll give it a try....

Allen Browne said:
The simplest solution will be to place a little command button beside your
combo. The button opens the form where a new person can be added. The
AfterUpdate event procedure of that form (not control) requeries the combo
on the original form.

If you want to do it all at once, this article discusses your options:
Adding values to lookup tables
at:
http://allenbrowne.com/ser-27.html
But I think you will find it messy to try to assign multiple fields and get
the new ID value and get it into the combo accurately and reliably all in
its NotInList event.
 

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