Synchronized Comboboxes in a continuous form

  • Thread starter Thread starter Marcia
  • Start date Start date
M

Marcia

I have a combobox for types of music and a combobox for artists. The rowsource
query for the artists combobox associates artists with different types of music.
In the query I use the name of the type of music combobox to limit the list of
artists when a type of music is first selected. This works well in a single form
but I'm having trouble in a continuous form. In a continuous form, when I select
a type of music, in all the records where the artist is not associated with this
type of music go blank. How do I implement synchronized comboboxes in a
continuous form?

Thank you!

Marcia
 
I have a combobox for types of music and a combobox for artists. The rowsource
query for the artists combobox associates artists with different types of music.
In the query I use the name of the type of music combobox to limit the list of
artists when a type of music is first selected. This works well in a single form
but I'm having trouble in a continuous form. In a continuous form, when I select
a type of music, in all the records where the artist is not associated with this
type of music go blank. How do I implement synchronized comboboxes in a
continuous form?

It's a bit of a pain in the neck. The problem arises because (despite
appearances) there's only ONE combo, displayed multiply; if you change
the properties (e.g. the rowsource) on one row, it changes for all of
them. And if the other rows have ID's which aren't part of the new
rowsource, you see a blank combo.

One solution is to base the Form on a Query joining the Artist table
to the current recordsource. Put a Textbox on the subform, carefully
superimposed on the text area of the combo box; set its properties to
Enabled=No, Locked=Yes, TabStop=No, and bind it to the artist name.

When the combo is dropped down you'll see the (current) list of names
from the rowsource query; when it's not, you'll see the textbox
showing the name corresponding to the current record.
 
Back
Top