combobox no match - add to new record?

J

JAson

Hello, I have a form with three lookup combo boxes, these
are PhoneNumber, AssociateExt, and LastName. These are
unbound and are just used to locate existing records in my
Contacts table. I do have each of these fields somewhere
on the form and in the event that the data entered into
one of the lookup boxes isn't on the list - Message
box "Not on the list, Would you like to add? then
automatically add a new record to the Contacts table and
then paste that data into the corresponding field on the
form.

Thanks in Advance for any help provided.
Jasong in AZ
 
B

Bas Cost Budde

JAson said:
Hello, I have a form with three lookup combo boxes, these
are PhoneNumber, AssociateExt, and LastName. These are
unbound and are just used to locate existing records in my
Contacts table. I do have each of these fields somewhere
on the form and in the event that the data entered into
one of the lookup boxes isn't on the list - Message
box "Not on the list, Would you like to add? then
automatically add a new record to the Contacts table and
then paste that data into the corresponding field on the
form.

Set the combobox's LimitToList property True, have a NotInList event
querying the user for additional values if necessary and a confirm, and
set the Response property to acDataErrAdded if the confirm was positive.
 

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