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
|
|||
|
|||
No Not In List
I have a combo box that has a list of employees names. I
want to be able to update it without actually having to go to the table and edit from there. I was told to go to the On Not in List event under properties, but I am stuck there. I searched the net for something pertaining to this, but nothing was produced. Can someone help me out with some code perhaps or a macro that might work here. Thanks, Frank |
#2
|
|||
|
|||
No Not In List
If you want other people who use your db to be able to do this as well just set the limit to list property to no. This should add the value to the table. (Please correct me if I am wrong). If you just want you to be able to do it, set up a button to open a data entry form. Enter your data there to add to the table. However you will have to either close your original form with the combo box and reopen it or requery your combo box. You can do this in the on close event of your data entry form.
|
#3
|
|||
|
|||
No Not In List
If you put this under the not in list event for the combo box it should add
the value to the list (and set it to that value). Private Sub Combo2_NotInList(NewData As String, Response As Integer) MsgBox "That value is not in the list. I will add it.", vbOKOnly Combo2.AddItem (Combo2.Text) Combo2.Value = Combo2.Text Response = True End Sub "Frank" wrote in message ... I have a combo box that has a list of employees names. I want to be able to update it without actually having to go to the table and edit from there. I was told to go to the On Not in List event under properties, but I am stuck there. I searched the net for something pertaining to this, but nothing was produced. Can someone help me out with some code perhaps or a macro that might work here. Thanks, Frank |
#4
|
|||
|
|||
No Not In List
Does this
|
#5
|
|||
|
|||
No Not In List
Frank,
This may help: http://www.pacificdb.com.au/MVP/Code/NIL.htm By the way, Access combo's and ListBoxes don't have an .AddItem method, as suggested by Doug. Regards, Graham R Seach Microsoft Access MVP Sydney, Australia Microsoft Access 2003 VBA Programmer's Reference http://www.wiley.com/WileyCDA/WileyT...764559036.html "Frank" wrote in message ... I have a combo box that has a list of employees names. I want to be able to update it without actually having to go to the table and edit from there. I was told to go to the On Not in List event under properties, but I am stuck there. I searched the net for something pertaining to this, but nothing was produced. Can someone help me out with some code perhaps or a macro that might work here. Thanks, Frank |
Thread Tools | |
Display Modes | |
|
|