Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not In List event

Status
Not open for further replies.

TeddyvN

Programmer
Feb 25, 2003
28
NL
Hi,

I have a combo-box on a form that is limited to the list displayed. What I want is to run a macro on the Not In List Event, so that I can enter new items in my combo-box. The problem is that Access displays an error message when you enter a not-listed item, which prevents my macro from running!
Any idea how to disable this warning?
Maybe with some kind of sendkey function in my macro?

I really thought this event would come in handy, but as my macro doesn't run, I'm getting desperate!

Teddy
 
You can try using the SetWarning to NO in your Macro. If that does not work, then convert your macro to VB, and in the error section, run your macro in there.
 
Hi

If you wish to do as you say, then you need to set the property which limits you to teh list to false, you can then enter a value which is not in the list and the notin list will fire, at this point you can run your macro. But I would advise taking the trouble to switch to VBA, macros are yesterdays technology, and you will gain major benifits from using VBA

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Thanks,

The setwarning to no doesn't help: according to the help-files in access the warnings should be set off before the action that triggers the warning happens. Now with the Not In List Event the action has already started, and the warning comes before the macro is run.

Convert to VB - I'm not very familiar with VB. What I do know is that the Not In List Event does not trigger an error, so I wonder if this solution would help...?

Teddy
 
Hi Ken,

Sorry, the macro will only fire when the option of the combo-list is set to Limit to List...


Teddy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top