B
Bob Richardson
Each year at a conference, attendees can choose to go to one of several
"retreats." The selection of retreats varies from year to year, with a lot
of overlap. When collecting the registration data I want the user to be able
to indicate the attendee's retreat choice from a combo box.
In a sub-form, I have a combo box with a lookup table, "Retreats", with two
columns.
Year Retreat
2002 one
2002 two
2002 four
2003 one
2003 three
etc.
The subform, "Conference", holds the year data.
The RowSource of the combo box looks like this.
SELECT Retreats.Retreat, Retreats.Year FROM Retreats WHERE
(((Retreats.Year)=Conference!year)) ORDER BY Retreats.Retreat;
This approach works perfectly when a selection has already been made. The
drop down list only shows the choices for that year. But if no Retreat has
been selected for that year, the drop down list will show the choices
available for the LAST YEAR WHEN THE COMBO BOX WAS USED.
For example, an attendee has been to the conferences in 2002, 2003 and 2004,
didn't go to a retreat in any of those years. You bring this person's record
up, go to the conference subform, and look at the 2004 selections. Of course
it shows no Retreat selected. If you look at the combo box choices, it will
correctly show the 2004 choices. If you next go to the 2003 record for that
individual (OR ANY OTHER INDIVIDUAL with no retreat selected) it will show
the 2004 choices in the combo box, not the 2003 choices.
It seems like I need to Requery, but what and where?
"retreats." The selection of retreats varies from year to year, with a lot
of overlap. When collecting the registration data I want the user to be able
to indicate the attendee's retreat choice from a combo box.
In a sub-form, I have a combo box with a lookup table, "Retreats", with two
columns.
Year Retreat
2002 one
2002 two
2002 four
2003 one
2003 three
etc.
The subform, "Conference", holds the year data.
The RowSource of the combo box looks like this.
SELECT Retreats.Retreat, Retreats.Year FROM Retreats WHERE
(((Retreats.Year)=Conference!year)) ORDER BY Retreats.Retreat;
This approach works perfectly when a selection has already been made. The
drop down list only shows the choices for that year. But if no Retreat has
been selected for that year, the drop down list will show the choices
available for the LAST YEAR WHEN THE COMBO BOX WAS USED.
For example, an attendee has been to the conferences in 2002, 2003 and 2004,
didn't go to a retreat in any of those years. You bring this person's record
up, go to the conference subform, and look at the 2004 selections. Of course
it shows no Retreat selected. If you look at the combo box choices, it will
correctly show the 2004 choices. If you next go to the 2003 record for that
individual (OR ANY OTHER INDIVIDUAL with no retreat selected) it will show
the 2004 choices in the combo box, not the 2003 choices.
It seems like I need to Requery, but what and where?