autoexpand or add concatenated name

  • Thread starter Thread starter CuriousMark
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top