Subform combo box selection effects all records

G

Guest

Access 2003. Subform has Master-Child link to table underlying main form
(one-to-many). I've changed one of the subform's controls to an unbound
combo box since there will be a limited vocabulary for the field. A "SELECT
DISTINCT ..." query is the row source for the combo box and its control
source is blank. If I'm entering a new record on the subform, and select a
value from the combo box' list, all records in the subform are populated with
that value rahther just the field for the record being added. What have I
done wrong?
 
C

Carl Rapson

rwfreeman said:
Access 2003. Subform has Master-Child link to table underlying main form
(one-to-many). I've changed one of the subform's controls to an unbound
combo box since there will be a limited vocabulary for the field. A
"SELECT
DISTINCT ..." query is the row source for the combo box and its control
source is blank. If I'm entering a new record on the subform, and select
a
value from the combo box' list, all records in the subform are populated
with
that value rahther just the field for the record being added. What have I
done wrong?

Unbound controls aren't very useful in continuous forms (I assume the
subform displays multiple records). In a continuous form, there is really
only one set of controls, even though it looks like there are many. If you
change the value in an unbound control, that value shows on every record.

Carl Rapson
 
G

Guest

So is there no solution? Could I add an unbound combo box that's not tied to
the data table so that it covers the unbound control on the subform then run
an update event when the new combo box loses focus?
 
C

Carl Rapson

What's the purpose in having an unbound control on your subform? If it's
simply to display a value for informational purposes, maybe you could put
the control on the parent form instead and set its value in the Current
event of the subform:

Me.Parent.Form.cboControl = "some value"

Carl Rapson
 

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