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  

No Not In List



 
 
Thread Tools Display Modes
  #1  
Old June 4th, 2004, 02:55 PM
Frank
external usenet poster
 
Posts: n/a
Default 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  
Old June 4th, 2004, 04:46 PM
Tasha
external usenet poster
 
Posts: n/a
Default 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  
Old June 4th, 2004, 11:39 PM
Doug Munich
external usenet poster
 
Posts: n/a
Default 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  
Old June 7th, 2004, 04:49 AM
gf
external usenet poster
 
Posts: n/a
Default No Not In List

Does this


  #5  
Old June 7th, 2004, 05:28 AM
Graham R Seach
external usenet poster
 
Posts: n/a
Default 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

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 07:49 AM.


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