Combo Box - shouldn't I be able to enter an item not listed?

G

Guest

I thought the combo box was supposed to allow one to enter new data that
isn't on the existing list? When I try to do this I get a pop-up error
telling me to select an item on the list. What am I doing wrong? I need to be
able to select from the list OR enter a new item to be added to the list. The
list comes from the table.
 
R

Rick Brandt

Chip said:
I thought the combo box was supposed to allow one to enter new data
that isn't on the existing list? When I try to do this I get a pop-up
error telling me to select an item on the list. What am I doing
wrong? I need to be able to select from the list OR enter a new item
to be added to the list. The list comes from the table.

Either the LimitToList property is set to Yes or you have a ComboBox that
displays one column while having another one that is bound.
 
F

fredg

I thought the combo box was supposed to allow one to enter new data that
isn't on the existing list? When I try to do this I get a pop-up error
telling me to select an item on the list. What am I doing wrong? I need to be
able to select from the list OR enter a new item to be added to the list. The
list comes from the table.

If the Combo box's LimitToList property is set to Yes you can only
select an item in the list. You can place code in the Combo's
NotInList event to allow for the addition to the list of a new entry.

Search http://www.goups.google.com for "NotInList"
for examples of how to do this. There are several different methods.
Which is best for you depends upon what else is needed.

If you don't wish to limit data to what is on the list, set the
LimitToList property to No.
 
G

Guest

Excellent. Now for a problem that popped up when entering new data -

I have the dropdown list working, I select a band from the list and it
populates the band name field like it should. Problem is it is also
generating a new band id for every entry I make, and it shouldn't do that.
Each band has it's own id, but each album entry has an id of it's own. How do
I get it to maintain the proper band id that is already associated with it
and not create a new one?
 
B

Bob Quintal

Excellent. Now for a problem that popped up when entering new data
-

I have the dropdown list working, I select a band from the list
and it populates the band name field like it should. Problem is it
is also generating a new band id for every entry I make, and it
shouldn't do that. Each band has it's own id, but each album entry
has an id of it's own. How do I get it to maintain the proper band
id that is already associated with it and not create a new one?
Set limit to list to yes, and use the NotInListEvent.

What is happening is that a typed in "The Band" has no id, versus :The
Band" selected by clicking which already has an ID. Access is getting
confused.
 

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