A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Not In List Messages



 
 
Thread Tools Display Modes
  #1  
Old April 19th, 2010, 08:09 PM posted to microsoft.public.access
PeterM
external usenet poster
 
Posts: 208
Default 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  
Old April 19th, 2010, 09:03 PM posted to microsoft.public.access
Daniel Pineault
external usenet poster
 
Posts: 658
Default 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  
Old April 19th, 2010, 09:15 PM posted to microsoft.public.access
PeterM
external usenet poster
 
Posts: 208
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.