In Combo Pièce, I noticed that the Row Source query is returning 3 fields
but you have 2 columns. However, this probably isn't hurting anything.
Also, the bound field for each combobox is the ID field returned by the
query. This is normal. However, I can't tell what type of field this ID
value is being stored in. For Combo Oeuvre, the field Oeuvres.ID from the
Row Source is being stored in Pièces.Oeuvre from the form's Record Source
and for Combo Pièce, the field Pièces.ID from the Row Source is being stored
in Plages.Pièce from the form's Record Source. Is this what you intend?
In Combo Pièce, the criteria for the query is referring to
[Forms]![Pièces]![Oeuvre]. By your description, the name Oeuvre is used by
both the combobox and the field. Try changing the name of the combobox to
cboOeuvre and change the reference in the query to this new name. Does that
help? I tried this as a test when I typed the SQL into the Row Source
instead of using a stored query and referred to the other combobox, not the
field, and it appeared to do what you are asking.
--
Wayne Morgan
Microsoft Access MVP
Alain Vaillancourt said:
I think all is correct but here is the details...
Form Record Source=SELECT Pièces.ID, Plages.Plage, Plages.Album,
Pièces.Oeuvre, Plages.Pièce, Pièces.Durée
FROM Pièces INNER JOIN Plages ON Pièces.ID = Plages.Pièce
ORDER BY Plages.Plage;
Combo Oeuvre:
Column Count=2
Bound Column=1
Control Source=Oeuvre
Row Source=SELECT Oeuvres.ID, Oeuvres.Titre FROM Oeuvres ORDER BY
Oeuvres.Titre;
Combo Pièce:
Column Count=2
Bound Column=1
Control Source=Pièce
Row Source=SELECT Pièces.ID, Pièces.Version, Pièces.Oeuvre
FROM Pièces WHERE (((Pièces.Oeuvre)=[Forms]![Pièces]![Oeuvre]))
ORDER BY Pièces.Version;