further question on adding values to lookup tables

Y

YuXuan-ji

Hi Allen,

Your tip posted on http://allenbrowne.com/ser-27.html is very helpful to me.
Now I have another question: how about if the combo doesn't have a control
source, although it still has a lookup table? The situation for case is that
this combo is in a form that is not related to any table. The function of
this form is to let the user input the search criteria and do the search
against a query.
So when I input a new value to the combo, it'll ask:

Do you wish to add the entry [NewData ] for [cbo.Name ]?

Then if I hit "OK", it'll return with an error message as:
Error 3265: Item not found in this collection.

So what could be the solution?

Thank you
 
D

Dale Fye

You need to put some code in the "NotInList" event of the combo box. You can
find references to this in the Access Help or Google on "Access +NotInList"

HTH
Dale
 

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