M
Mantok
I have a pair of combo boxes. Via SQL, the second uses
the value in cmbFirst to narrow the possible choices. The
first time one uses the form to select the cmbSecond, the
values are correct. But if the user reselects a different
value for cmbFirst, the values in cmbSecond are not
repopulated.
How do I get the values to repopulate?
code:
SELECT DISTINCTROW tblexample.value2 FROM tblexample GROUP
BY tblexample.value2, IIf(IsNull([cmbFirst]),1=1,
([tblExample].[value1])=[cmbFirst]) HAVING (((IIf(IsNull
([cmbFirst]),1=1,([tblExample].[value1])=[cmbFirst]))
=True)) ORDER BY tblExample.value1;
the value in cmbFirst to narrow the possible choices. The
first time one uses the form to select the cmbSecond, the
values are correct. But if the user reselects a different
value for cmbFirst, the values in cmbSecond are not
repopulated.
How do I get the values to repopulate?
code:
SELECT DISTINCTROW tblexample.value2 FROM tblexample GROUP
BY tblexample.value2, IIf(IsNull([cmbFirst]),1=1,
([tblExample].[value1])=[cmbFirst]) HAVING (((IIf(IsNull
([cmbFirst]),1=1,([tblExample].[value1])=[cmbFirst]))
=True)) ORDER BY tblExample.value1;