I'm using Access2000.
I have two combo boxes on a form.
The first one has 2 items (say A & B)
and the second one has also 2 items
(say C & D).
When I choose item A on combo1 the other
combo becomes hidden. When I choose
item B on combo1 then combo2 appears and
I can choose items C or D.
Default value for combo1 is item A.
Now the problem I have is the following:
When I choose value B from combo1 and move
to the next record, combo2 does not get
hidden (as it should since it gets the
default value for it, i.e. item A).
How can I refresh the form after I move to
a new record or do something about it so
the form will show the combo boxes correctly.
Here is the code for AfterUpdate for combo1:
Private Sub combo1_AfterUpdate()
' This is Unfinished!
' Find a solution to this
' When changing field it doesn't updates
Select Case combo1.Value
Case "B"
labelcombo2.Visible = True
combo2.Visible = True
Case "A"
labelcombo2.Visible = False
combo2.Visible = False
Case Else
' Something is Wrong!
End Select
Me.Refresh
End Sub
Please Help.
Thank you in advance!
CM
I have two combo boxes on a form.
The first one has 2 items (say A & B)
and the second one has also 2 items
(say C & D).
When I choose item A on combo1 the other
combo becomes hidden. When I choose
item B on combo1 then combo2 appears and
I can choose items C or D.
Default value for combo1 is item A.
Now the problem I have is the following:
When I choose value B from combo1 and move
to the next record, combo2 does not get
hidden (as it should since it gets the
default value for it, i.e. item A).
How can I refresh the form after I move to
a new record or do something about it so
the form will show the combo boxes correctly.
Here is the code for AfterUpdate for combo1:
Private Sub combo1_AfterUpdate()
' This is Unfinished!
' Find a solution to this
' When changing field it doesn't updates
Select Case combo1.Value
Case "B"
labelcombo2.Visible = True
combo2.Visible = True
Case "A"
labelcombo2.Visible = False
combo2.Visible = False
Case Else
' Something is Wrong!
End Select
Me.Refresh
End Sub
Please Help.
Thank you in advance!
CM