Hi
I have form with 4 cascading combo boxes and if you filter down after the form has opened they work fine. If the combo boxes have records and you go back to the 1st combo and choose another record, the 2nd combo correctly shows the selection and the 4th combo is cleared and locked as it should be. However the 3rd combo contains the record set data from the previous selection and has not/doesn't appear to have requeried.
I thought that maybe the requery of the next cbo in the cascade was causing the the problem with the subsequent cbo.
The code that I am using is as follows:
[Private Sub cbo1_AfterUpdate()
Me.cbo2.Requery
Me.cbo2.Locked = Me.cbo2.ListCount < 1
Me.cbo2.Enabled = Me.cbo2.ListCount > 0
Me.cbo3.Requery
Me.cbo3 = ""
Me.cbo3.Locked = Me.cbo3.ListCount < 1
Me.cbo3.Enabled = Me.cbo3.ListCount > 0
Me.cbo4.Requery
Me.cbo4 = ""
Me.cbo4.Locked = Me.cbo4.ListCount < 1
Me.cbo4.Enabled = Me.cbo4.ListCount > 0
End Sub]
Thanks
Steven811
I have form with 4 cascading combo boxes and if you filter down after the form has opened they work fine. If the combo boxes have records and you go back to the 1st combo and choose another record, the 2nd combo correctly shows the selection and the 4th combo is cleared and locked as it should be. However the 3rd combo contains the record set data from the previous selection and has not/doesn't appear to have requeried.
I thought that maybe the requery of the next cbo in the cascade was causing the the problem with the subsequent cbo.
The code that I am using is as follows:
[Private Sub cbo1_AfterUpdate()
Me.cbo2.Requery
Me.cbo2.Locked = Me.cbo2.ListCount < 1
Me.cbo2.Enabled = Me.cbo2.ListCount > 0
Me.cbo3.Requery
Me.cbo3 = ""
Me.cbo3.Locked = Me.cbo3.ListCount < 1
Me.cbo3.Enabled = Me.cbo3.ListCount > 0
Me.cbo4.Requery
Me.cbo4 = ""
Me.cbo4.Locked = Me.cbo4.ListCount < 1
Me.cbo4.Enabled = Me.cbo4.ListCount > 0
End Sub]
Thanks
Steven811