IN THE SPOTLIGHT: MDE to MDB Conversion Service
(also supports: ACCDE to ACCDB, ADE to ADP, etc)
IN THE SPOTLIGHT: vbWatchdog
VBA error handling just got easier...
" vbWatchdog is off the chart. It solves a long standing problem of how to consolidate error handling into one global location and avoid repetitious code within applications. "
- Joe Anderson,
Microsoft Access MVP
Meet Shady, the vbWatchdog mascot watching over your VBA code →
(courtesy of Crystal Long, Microsoft Access MVP)
IN THE SPOTLIGHT: vbMAPI
An Outlook / MAPI code library for VBA, .NET and C# projects
Get emails out to your customers reliably, and without hassle, every single time.
Use vbMAPI alongside Microsoft Outlook to add professional emailing capabilities to your projects.
Provided by email@example.com (Armin Burkholder)
The functionality of combo boxes can be extended significantly by adding a bit of code to the NotInList event which gets triggered when the LimitToList property is set to Yes and the user enters text that is not listed in the combo.
It can be made to add new records, change existing search fields, and so on. Your first line of code should be:
DoCmd DoMenuItem A_FORMBAR, A_EDIT, A_UNDOFIELD, , A_MENU_VER20
You can then do what you like, because you have the new value that the user typed in to the NewData parameter and the original data is still available in the field. I generally open a modal form asking if the user wishes to add a new record or change the existing one, and then take appropriate action in the recordset.
The only trick is to end the NotInList subroutine with
Response = DATA_ERRCONTINUE
This forces Access to ignore the error condition which originated the trigger for the NotInList subroutine.
See also Managing Combo Boxes
This tip was supplied by firstname.lastname@example.org (Armin Burkholder), May 16, 1995.
Have your say - comment on this article.
What did you think of 'Using the NotInList event (combo)'?
No comments yet.
Why not be the first to comment on this article?!
Have your say...