Full Version: eliminate the "Not on List" message box
UtterAccess Forums > Microsoft® Access > Access Forms
swgeof
Is this possible? I'd like to use my own message box and then take the user to another form.
Thanks
Geof
fkegley
I generally just give the user an Add New button, that does not involve the Not In List event at all. The Add New button opens a form that allows the user to add the new data to the table that is the row source of the combo box, then requeries the involved combo box, for instance, when the user closes the form.
BananaRepublic
To answer the question at hand- the NotInList event should have that line:
!--c1-->
CODE
Response = acDataErrContinue

to suppress the error display.
Like fkeglye, though, I've found it more preferable to provide a button to add new rather than use Not In List, which can be quite a bear especially if the rowsource uses a calculated field. It can work, but not as stable and reliably as I would have had liked it.
swgeof
Thanks, the Response = acDataErrContinue worked.
<
This was helpful also. So now if it's not on the list, I open the form where they need to add the data, after it's added, they close that form and go back to the one with the combo box which is refreshed on focus.
Thanks!
fkegley
You're welcome. BananaRepublic and I are glad we could help.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.