My combo box is not working properly.

K

KarenK

I created an unbound combo box that lists several values (company
affiliations) as a possible choice for each person in my contact list. When
I choose a value for one person, that value is changed throughout my entire
database for everyone else. Also, once I used the drop down list, the last
value I chose is always visible, instead of a blank space. Help!
 
K

Ken Snell [MVP]

Sounds as if your combo box is not unbound after all. What is in the
ControlSource for the combo box (form's design view)?
 
S

sinuesino

KarenK said:
I created an unbound combo box that lists several values (company
affiliations) as a possible choice for each person in my contact list. When
I choose a value for one person, that value is changed throughout my entire
database for everyone else. Also, once I used the drop down list, the last
value I chose is always visible, instead of a blank space. Help!
 
K

KarenK

lKen:

You're a genius. The ControlSource was blank. I selected the field that
corresponded to the list and all seems well.

I do have another question: When I want to filter data, how do I include
all the values in the combo box in a query?

Thanks,
Karen
 
K

Ken Snell [MVP]

Thanks for the accolade, but before I move on to the next question, let me
clarify what the situation was for the first one so that you don't have a
misunderstanding of what we were discussing.

I had understood from your post that your data were actually being changed
in the table when you made a selection in your combo box. An unbound combo
box has a blank Control Source property *or* it has an expression
(calculated) in the Control Source. A bound combo box has a field name in
the Control Source.

In your case, what it appears is that your combo box indeed was unbound, and
as such it did not "change" its displayed information from one record to
another as you navigated through the records. When you put a field name in
the Control Source, you made it into a bound combo box, and thus it now will
display the data corresponding to a record. So what you did is the right
solution, but it's different from what I had been thinking. I didn't want to
leave you with wrong information.

Now for the new question. I need to ask for clarification. What do you want
to filter? What will the query be used for? A combo box can contain only one
value at a time, so I'm not clear what you mean by "all the values in the
combo box"?
--

Ken Snell
<MS ACCESS MVP>
 
K

KarenK

Ken:

Well, the data didn't change in the underlying table (the field name is
Affiliation), but in each individul record in the database. That is, when
Iselected "administrator" in one record, that field was changed to
administrator in each previous record, and was already present when I went to
the next record. Your question about the ControSource seems to have solved
it: I simply selected Affiliation from the ControlSource options and the
drop list appears to be working the way I thought it would. Perhaps it was a
bound box I wanted.

As for filtering, I am wondering - since the field Affiliation contains this
drop-down box with 12 values to choose from - how I can pick and choose from
these values when creating a report. Simply choosing the field Affiliation
in the report wizard didn't give me all the possible values. In the table,
whatever value I chose for each record is there in the field column, but only
the field name appears in the report wizard, not all the values in the
drop-down list that go with it.

Thanks, Ken.
 
K

Ken Snell [MVP]

The combo box has a RowSource that likely is a query that is drawing the
values from your table. What you'll want to do is to use a query similar to
that combo box's RowSource query as the basis for what you want to do.

I'm not clear if you want to have a similar combo box that would allow you
to select an item in order to have a report run based on that selection, or
if you want a report that will include all the values. Post back with more
details and specifics about what you want to do.
--

Ken Snell
<MS ACCESS MVP>
 
Top