add new item to combobox

M

mcnewsxp

is there a way for a user to add an item to a combo box?
lets say a user doesn't find what he is looking for in the combobox and
wants to add new item directly to the combobox.
can this be doen?

i know how to get new items into a combobox using other controls - that is
not what i am asking.

thanks,
mcnewsxp
 
G

Guest

First you need to set the Limit To List property of the combo box to No.
Then, it the Not In List Event, you need to do whatever you want to manage
adding the new value to the list. How you do that depends on the Row Source
Type property. And last, you will need to requery the combo box so the new
value will show up in the list.
 
M

mcnewsxp

First you need to set the Limit To List property of the combo box to No.
Then, it the Not In List Event, you need to do whatever you want to manage
adding the new value to the list. How you do that depends on the Row
Source
Type property. And last, you will need to requery the combo box so the
new
value will show up in the list.
the problem i am having with that approach is it wants the bound column
(hidden ID field) to be visible which is numeric and not at all what i want
to add to the list.
know what i mean?
 
G

Guest

Is the hidden ID field an autonumber field in the row source for your combo?
Can you give more details on the row source, like what type is it (table,
query, value list, field list)? How are you trying to add the new value?
 
M

mcnewsxp

Is the hidden ID field an autonumber field in the row source for your
combo?
Can you give more details on the row source, like what type is it (table,
query, value list, field list)? How are you trying to add the new value?
it's a table with an autonumber and text field.
i want to add new text and i need to be able to access the autonumber ID
field for further processing on the form.
 
G

Guest

When you create a new record with an Autonumber field, that field will be
assigned a value. Then, when you do Me.MyComboBox.Requery, it should add all
the columns in the combo's row source. Is it not doing that? Also, what are
you using the autonumber for processing for? That is a bit unusual.
 
M

mcnewsxp

When you create a new record with an Autonumber field, that field will be
assigned a value. Then, when you do Me.MyComboBox.Requery, it should add
all
the columns in the combo's row source. Is it not doing that? Also, what
are
you using the autonumber for processing for? That is a bit unusual.
users will be able to add to the combo that shares data with all users but
at the same time insert to a table that belongs to the current user.
 
G

Guest

That makes sense. So have you got it working?

mcnewsxp said:
users will be able to add to the combo that shares data with all users but
at the same time insert to a table that belongs to the current user.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top