Cascading Combos Again

  • Thread starter Thread starter TeeSee
  • Start date Start date
T

TeeSee

The following is the row source content of both combo boxes.

SELECT DISTINCT tblMaterialMaster.LocalGroup
FROM tblMaterialMaster;


SELECT DISTINCT tblMaterialMaster.LocalSubGroup,
tblMaterialMaster.LocalGroup
FROM tblMaterialMaster
WHERE (((tblMaterialMaster.LocalGroup)=[Forms]!
[frmCustomerDiscountsInput]![MaterialGroup]))
ORDER BY tblMaterialMaster.LocalSubGroup;


The combos function as expected until .......

Having selected the item in the first CB I then drop down the second
CB only to realize that I made a mistake in choosing the item in the
forst CB. I return to the first CB and reselect but the available list
in the second CB remains the same

I think I some how have to requery but I'm not sure what to
requery .... Could someone please explain why this is happening and
how to properly correct it.

Thanks
 
You need an AfterUpdate event in the first combo:

Sub FirstCombo_AfterUpdate()
Me.SecondCombo.Requery
End Sub
 
Back
Top