Rogerianus
asked on
on not in list property
Hello,
I use the 'on not in list' combobox property to run some VBA code for opening a form where I can add new entries (codes and descriptions).
After showing a msgbox ('do you want to create a new entry?'), there is always a standard Access information message showing up 'The text you entered is not an item on the list'.
How can I avoid this message?
I already tried setwarnings false and on error goto 0.
Does anyone know?
I use the 'on not in list' combobox property to run some VBA code for opening a form where I can add new entries (codes and descriptions).
After showing a msgbox ('do you want to create a new entry?'), there is always a standard Access information message showing up 'The text you entered is not an item on the list'.
How can I avoid this message?
I already tried setwarnings false and on error goto 0.
Does anyone know?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
marcoszorrilla,
Setting "Limit to list" to "No" will suppress the "OnNotinlist" event....
Nic;o)
Setting "Limit to list" to "No" will suppress the "OnNotinlist" event....
Nic;o)
How do you add the new entries?
Once you have added them to the source table of the combobox, you just refresh your combo:
...
your code
...
Me.ComboBox.Requery
Once you have added them to the source table of the combobox, you just refresh your combo:
...
your code
...
Me.ComboBox.Requery
Setting "Limit to list" to "No" will suppress the "OnNotinlist" event....
I have just made the test and it is exactly this way.
Nic;o) you are right.
Bye.
I have just made the test and it is exactly this way.
Nic;o) you are right.
Bye.
ASKER
That's it, Nico!!
Every day I'm learning something new...
Thank you for your cooperation, have a nice weekend!
Roger.
Every day I'm learning something new...
Thank you for your cooperation, have a nice weekend!
Roger.
Nice weekend too ;-)
And success with the application !
Nic;o)
And success with the application !
Nic;o)
Bye.