If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Not In List Messages
I have a combobox with LIMITTOLIST = yes. I have code in the NOTINLIST event
to display a message about the error. That all works fine. The problem I have is that AC2003 always displays a system message that the data entered is not in the list. My question is: how do I suppress that message? I've tried to search for the err.number in both the AFTERUPDATE and NOTINLIST events, but the err.number is 0. Thank You! |
#2
|
|||
|
|||
Not In List Messages
This is controlled by the Response variable.
Check the VBE Help for the 'Not In List Event' all the details are there. "Response The setting indicates how the NotInList event was handled. The Response argument can be one of the following intrinsic constants: Constant Description acDataErrDisplay (Default) Displays the default message to the user. You can use this when you don't want to allow the user to add a new value to the combo box list. acDataErrContinue Doesn't display the default message to the user. You can use this when you want to display a custom message to the user. For example, the event procedure could display a custom dialog box asking if the user wanted to save the new entry. If the response is Yes, the event procedure would add the new entry to the list and set the Response argument to acDataErrAdded. If the response is No, the event procedure would set the Response argument to acDataErrContinue. acDataErrAdded Doesn't display a message to the user but enables you to add the entry to the combo box list in the NotInList event procedure. After the entry is added, Microsoft Access updates the list by requerying the combo box. Microsoft Access then rechecks the string against the combo box list, and saves the value in the NewData argument in the field the combo box is bound to. If the string is not in the list, then Microsoft Access displays an error message." Simply google the subject and you'll find a ton of example showing how you work with it in your code http://www.databasedev.co.uk/not_in_list.html http://www.blueclaw-db.com/access_no...ed_example.htm -- Hope this helps, Daniel Pineault http://www.cardaconsultants.com/ For Access Tips and Examples: http://www.devhut.net Please rate this post using the vote buttons if it was helpful. "PeterM" wrote: I have a combobox with LIMITTOLIST = yes. I have code in the NOTINLIST event to display a message about the error. That all works fine. The problem I have is that AC2003 always displays a system message that the data entered is not in the list. My question is: how do I suppress that message? I've tried to search for the err.number in both the AFTERUPDATE and NOTINLIST events, but the err.number is 0. Thank You! |
#3
|
|||
|
|||
Not In List Messages
Thank you very much Dan... you guys are the best!
"Daniel Pineault" wrote: This is controlled by the Response variable. Check the VBE Help for the 'Not In List Event' all the details are there. "Response The setting indicates how the NotInList event was handled. The Response argument can be one of the following intrinsic constants: Constant Description acDataErrDisplay (Default) Displays the default message to the user. You can use this when you don't want to allow the user to add a new value to the combo box list. acDataErrContinue Doesn't display the default message to the user. You can use this when you want to display a custom message to the user. For example, the event procedure could display a custom dialog box asking if the user wanted to save the new entry. If the response is Yes, the event procedure would add the new entry to the list and set the Response argument to acDataErrAdded. If the response is No, the event procedure would set the Response argument to acDataErrContinue. acDataErrAdded Doesn't display a message to the user but enables you to add the entry to the combo box list in the NotInList event procedure. After the entry is added, Microsoft Access updates the list by requerying the combo box. Microsoft Access then rechecks the string against the combo box list, and saves the value in the NewData argument in the field the combo box is bound to. If the string is not in the list, then Microsoft Access displays an error message." Simply google the subject and you'll find a ton of example showing how you work with it in your code http://www.databasedev.co.uk/not_in_list.html http://www.blueclaw-db.com/access_no...ed_example.htm -- Hope this helps, Daniel Pineault http://www.cardaconsultants.com/ For Access Tips and Examples: http://www.devhut.net Please rate this post using the vote buttons if it was helpful. "PeterM" wrote: I have a combobox with LIMITTOLIST = yes. I have code in the NOTINLIST event to display a message about the error. That all works fine. The problem I have is that AC2003 always displays a system message that the data entered is not in the list. My question is: how do I suppress that message? I've tried to search for the err.number in both the AFTERUPDATE and NOTINLIST events, but the err.number is 0. Thank You! |
Thread Tools | |
Display Modes | |
|
|