D
DocBrown
I have a question about combo boxes and list boxes on continuous forms. Some
of you on this group will recognize this project....
Can someone tell me why I'm seeing different behavior with combo boxes and
List boxes?
Here's the scoop...
The form is based on Allen Browne's Flexable Search form where the filtered
records are displayed in the detail section. No alteration of the data is
allowed in this form.
The combo box has a query that gathers related records in a one-to-many
relationship and includes a lookup table (FocusList) that translates TypeID
to a string:
SELECT VolunteerFocus.VolunteerID, FocusList.Focus
FROM FocusList INNER JOIN VolunteerFocus ON FocusList.TypeID =
VolunteerFocus.TypeID
WHERE (((VolunteerFocus.VolunteerID)=[Forms]![Search Query
Prompts]![VolunteerID_Box]))
ORDER BY FocusList.Focus;
The idea is the user will click on the combobox and see the related record
data. As you see, the records in FocusList are selected based on the
VolunteerID in the main table.
To make the each row display the corresponding records, there's a requery
event in the Form's OnCurrent Event and VolunteerID_Box AfterUpdate event:
Me.Focus_Box.Requery
For the combo box, this all works. But doing exactly the same for a list box
doesn't. The displayed contents of the list boxes for all the records are the
same and are records retrieved for the VolunteerID of the selected (current)
record. I put the equivalent Requery action in the same places, but it still
doesn't work.
Any ideas why it works for Combo box but not List Box? The relevant
properties are identical, I think.
Thanks,
John S.
of you on this group will recognize this project....
Can someone tell me why I'm seeing different behavior with combo boxes and
List boxes?
Here's the scoop...
The form is based on Allen Browne's Flexable Search form where the filtered
records are displayed in the detail section. No alteration of the data is
allowed in this form.
The combo box has a query that gathers related records in a one-to-many
relationship and includes a lookup table (FocusList) that translates TypeID
to a string:
SELECT VolunteerFocus.VolunteerID, FocusList.Focus
FROM FocusList INNER JOIN VolunteerFocus ON FocusList.TypeID =
VolunteerFocus.TypeID
WHERE (((VolunteerFocus.VolunteerID)=[Forms]![Search Query
Prompts]![VolunteerID_Box]))
ORDER BY FocusList.Focus;
The idea is the user will click on the combobox and see the related record
data. As you see, the records in FocusList are selected based on the
VolunteerID in the main table.
To make the each row display the corresponding records, there's a requery
event in the Form's OnCurrent Event and VolunteerID_Box AfterUpdate event:
Me.Focus_Box.Requery
For the combo box, this all works. But doing exactly the same for a list box
doesn't. The displayed contents of the list boxes for all the records are the
same and are records retrieved for the VolunteerID of the selected (current)
record. I put the equivalent Requery action in the same places, but it still
doesn't work.
Any ideas why it works for Combo box but not List Box? The relevant
properties are identical, I think.
Thanks,
John S.