add new item to list box

kes

Registered User.
Local time
Tomorrow, 01:16
Joined
Mar 6, 2013
Messages
53
hi,

I have a list box on a form and I would like the user to have the possibilty to add another item not from the list into the table using a command button.
how can I do that?
thanks for the helpers!
 
One way is to open a form bound to that table, then requery the listbox.
 
And in that form what should i write in the command button?
I want the users to have the option to add items that not on the value list
 
Look into the NotInList event of the listbox.. If you want to add through button.. On click if the button, use..
Code:
DoCmd.OpenForm "theBoundFormName", DataMode:=acFormAdd
 
I'm on an iPad right now, but does a listbox have a not in list event? You can't type into it.
 
I'm on an iPad right now, but does a listbox have a not in list event? You can't type into it.
Thanks for coming along Paul, :)

That is my bad.. The event is not exactly called Not in List.. It is "List Item Edit Form", which is similar to the NotInList event.. Sorry Kes..

attachment.php
 

Attachments

  • editList.png
    editList.png
    7.5 KB · Views: 418
Thanks for coming along Paul, :)

That is my bad.. The event is not exactly called Not in List.. It is "List Item Edit Form", which is similar to the NotInList event.. Sorry Kes..

attachment.php


when did that come in, Paul?

I haven't seen that option before.
 
I am using Access 2010, it has always been there.. :confused:
 
I believe that feature was introduced with 2007.
 
Hi, pbaldy is right... It's a list box... I can't type into it, so the not in list event can't happend...
 
no. I have 2010... the option exists, but because I can't type to a list box nothing happend (not on list event can't happend)
 

Users who are viewing this thread

Back
Top Bottom