Why is combo box is changing values in table?

G

G.

I have a simple table - 1 field (text data type) with 5 rows. I make a new
form and add a combo box bound to the field. I save the form and select one
of the 5 choices.

If I then close the form and open the table that the combo box is based on
the entries in the 5 rows change. The first entry is gone and replaced by
whatever the selection was in the combo box when I closed the form. Before
the creation of the form rows in the table were say A,B,C,D,E. After combo
box creation (let's say I closed the form with a selection of D in the combo)
the table now has Rows of D,B,C,D,E. I've been working for hrs. trying to
resolve this to no avail.

One thing I tried that may give insight is to create a query with the same
info. as the table. However, when binding a combo box on that query, I get
the 5 selections but the form just beeps at me when I try to select one of
the items. It does not let me select anything.

Any help with what is going on is very very appreciated.
 
J

John W. Vinson

I have a simple table - 1 field (text data type) with 5 rows. I make a new
form and add a combo box bound to the field. I save the form and select one
of the 5 choices.

If I then close the form and open the table that the combo box is based on
the entries in the 5 rows change. The first entry is gone and replaced by
whatever the selection was in the combo box when I closed the form. Before
the creation of the form rows in the table were say A,B,C,D,E. After combo
box creation (let's say I closed the form with a selection of D in the combo)
the table now has Rows of D,B,C,D,E. I've been working for hrs. trying to
resolve this to no avail.

One thing I tried that may give insight is to create a query with the same
info. as the table. However, when binding a combo box on that query, I get
the 5 selections but the form just beeps at me when I try to select one of
the items. It does not let me select anything.

Any help with what is going on is very very appreciated.

That's exactly what a combo box is designed to do: to allow you to select a
value (from the combo's Row Source, usually a query) and store that value into
a field in the table (the combo's Control Source). This is why combo boxes are
useful in updating data!

If you want to use the combo for *some other purpose*, such as selecting which
record to see, leave its Control Source property blank.

A query won't help because either the query isn't updateable (as yours
apparently wasn't), or because updating the query is simply a way to update
the table. The data in the query has no independent existance.
 
J

John W. Vinson

.is it possible to edit multiple
values based on the value selected in the combo box?

No, but you can use the value in the combo box as a criterion in an Update
Query. BUT!!! - Why would you want to select ONE record and have an edit on
it affect MANY records?
 

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