T
Terri
I have two combo boxes on a form. They are both based on the same table.
In certain instances, if certain choices are made on the first combo box,
I'd like to automatically update the second combo box. I don't mean I want
to change the drop-down options of the second box, I just want to have it
filled in with one of these options.
Here is code I have in the AfterUpdate event of the first combo box.
Qx14Out is the second combo box. The outcome codes are always the first
column of the option box:
Private Sub Qx14CallOut1_AfterUpdate()
Dim strOut As String
If Me.Qx14CallOut1 = "03" Then
strOut = "05"
ElseIf Me.Qx14CallOut1 = "04" Then
strOut = "02"
ElseIf Me.Qx14CallOut1 = "06" Then
strOut = "06"
End If
If strOut <> "" Then
Me!Qx14Out = strOut
Me.Refresh
End If
End Sub
Basically now, nothing is happening when I update the first box. There must
obviously be something different about combo boxes, because I can easily
update a text box this way...?
Thanks much - Terri
In certain instances, if certain choices are made on the first combo box,
I'd like to automatically update the second combo box. I don't mean I want
to change the drop-down options of the second box, I just want to have it
filled in with one of these options.
Here is code I have in the AfterUpdate event of the first combo box.
Qx14Out is the second combo box. The outcome codes are always the first
column of the option box:
Private Sub Qx14CallOut1_AfterUpdate()
Dim strOut As String
If Me.Qx14CallOut1 = "03" Then
strOut = "05"
ElseIf Me.Qx14CallOut1 = "04" Then
strOut = "02"
ElseIf Me.Qx14CallOut1 = "06" Then
strOut = "06"
End If
If strOut <> "" Then
Me!Qx14Out = strOut
Me.Refresh
End If
End Sub
Basically now, nothing is happening when I update the first box. There must
obviously be something different about combo boxes, because I can easily
update a text box this way...?
Thanks much - Terri