Go Back   Access World Forums > Microsoft Access Reference > Sample Databases

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 06-27-2011, 05:13 PM   #1
John Big Booty
AWF VIP
 
John Big Booty's Avatar
 
Join Date: Aug 2005
Location: Planet 10, by way of the Eighth Dimension
Posts: 8,263
Thanks: 113
Thanked 1,012 Times in 865 Posts
John Big Booty is a jewel in the rough John Big Booty is a jewel in the rough John Big Booty is a jewel in the rough
Adding Items to a Combo Box through the Double Click Event

This sample demonstrates the use of the Not In List and On Double Click events of a combo box to firstly notify the user that the item they have attempted to enter is not in the list and that they should Double Click the Combo box to add that item.

As a modification of the usual double click event, the code in this sample collects the value that the user tried to enter and passes that value to the data entry form that is opened to allow the addition.

Further modification of the code and the use of a Public Variable pushes the newly entered item back to the combo box. Essentially simplifying the task of adding and selecting a new value in the combo box.

Note: In the event that the user enters multiple new records the code will simply push the last entered value back to the combo, and in the event that the user tabs to a new record prior to closing the data entry form, no value is pushed back to the combo.

The code is fully explained within the code Comments.
Attached Files
File Type: zip Combo Box Update.zip (26.7 KB, 2459 views)

__________________
...but they're only monkey boys!!!

Last edited by John Big Booty; 09-14-2011 at 01:34 PM. Reason: Spelling
John Big Booty is offline  
The Following 12 Users Say Thank You to John Big Booty For This Useful Post:
Ahmad Ruchiyat (08-07-2012), Alanthie (03-07-2012), assenucler (09-25-2011), brharrii (01-17-2014), c4soft (03-26-2012), Danick (01-28-2012), hortizjr59 (09-08-2011), Jimcb8 (02-18-2013), MichaelWaimauku (01-10-2013), mtomar (11-25-2011), niranjanprajapati23 (10-26-2018), sakrtwo (09-03-2015)
Closed Thread

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Double Click on Record Selector Event MooreCreations Modules & VBA 4 09-10-2008 11:17 AM
Cant work out double click event for treeview 6.0 Phonik General 2 12-11-2007 06:04 AM
List Box Double Click Event Please Help TheViruz30 Forms 3 02-12-2006 01:51 PM
Double Click Event KTJ_SBS Forms 3 01-14-2005 01:01 AM
Double Click Event for Datasheet cturton Forms 2 06-10-2000 02:22 PM




All times are GMT -8. The time now is 08:22 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World