I have a main entry form which I am currently debugging before deployment. This form has a tab control with subforms.
On a subform there is a combo box. Based on the choice made, a certain combo (cboA) will become visible with a list of choices to choose from (3 choices in cboA - 3 combos (cboB, cboC, cboD) which each become visible depending on choice made).
This all works fine and the records store correctly. The issue is that if I go to a new main record and back to this one, cboA on this subform will show the choice that had been chosen, but cboB (made visible by cboA) is now not visible. If I choose another choice in cboA, the cboC, and if I choose the original choice cboB becomes visible with the filtered choice still made.
How do I get the main form and subform nagivation code to force a refresh for the first combo choice code to refresh the visiblity of the correct secondary combo, please? I use this method in a few places, so whatever the solution, I will be putting it in a bunch of spots.
This is the code that I have on chage of the cboA
Any thoughts???
Thanks!
misscrf
It is never too late to become what you could have been ~ George Eliot
On a subform there is a combo box. Based on the choice made, a certain combo (cboA) will become visible with a list of choices to choose from (3 choices in cboA - 3 combos (cboB, cboC, cboD) which each become visible depending on choice made).
This all works fine and the records store correctly. The issue is that if I go to a new main record and back to this one, cboA on this subform will show the choice that had been chosen, but cboB (made visible by cboA) is now not visible. If I choose another choice in cboA, the cboC, and if I choose the original choice cboB becomes visible with the filtered choice still made.
How do I get the main form and subform nagivation code to force a refresh for the first combo choice code to refresh the visiblity of the correct secondary combo, please? I use this method in a few places, so whatever the solution, I will be putting it in a bunch of spots.
This is the code that I have on chage of the cboA
Code:
If IsNull(me.cboA) Then
Me.cboB.Visible = False
Me.cboC.Visible = False
Me.cboD.Visible = False
ElseIf me.cboA = 1 Then
Me.cboB.Visible = True
Me.cboC.Visible = False
Me.cboD.Visible = False
Me.cboB.Requery
ElseIf me.cboA = 2 Then
Me.cboB.Visible = False
Me.cboC.Visible = True
Me.cboD.Visible = False
Me.cboC.Requery
ElseIf me.cboA = 3 Then
Me.cboB.Visible = False
Me.cboC.Visible = False
Me.cboD.Visible = True
Me.cboD.Requery
Any thoughts???
Thanks!
misscrf
It is never too late to become what you could have been ~ George Eliot