Hi
When I have been through the combo boxes once and made my selection everything is fine. When I go back to the top and start again, the next but one combo doesn't requery as I have planned.
I have tried to make it happen with OnUpdate, OnChange and OnClick without success.
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]
The odd thing is that the same code clears the display as it should.
Any assistance would be appreciated.
Steven811
When I have been through the combo boxes once and made my selection everything is fine. When I go back to the top and start again, the next but one combo doesn't requery as I have planned.
I have tried to make it happen with OnUpdate, OnChange and OnClick without success.
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]
The odd thing is that the same code clears the display as it should.
Any assistance would be appreciated.
Steven811