Combo Box After Update Event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code on two different forms which reference the table,
tblReturns.

Private Sub ActionID_AfterUpdate()
Me.Action = [ActionID].Column(2)
Me.ActionType = [ActionID].Column(1)
End Sub

This works perfectly fine on one form and whatever ActionID is selected in
the combo box, it puts the corresponding Action and ActionType in the
appropriate boxes. On the second form this only works for the ActionType and
does not fill in the Action. I have checked that both codes are the same, the
table is ok, the bound columns to the combo box are the same. Does anyone
have an idea what else I could check or what is going wrong?

TIA
 
I would check two things
1. The Row Source of the combo, does the SQL include the Action field?
2. The ColumnCount Property of the combo, has 3 in it
 
Thanks Ofer!

ColumnCount! I knew it was something simple!!


Ofer said:
I would check two things
1. The Row Source of the combo, does the SQL include the Action field?
2. The ColumnCount Property of the combo, has 3 in it

--
\\// Live Long and Prosper \\//
BS"D


albycindy said:
I have the following code on two different forms which reference the table,
tblReturns.

Private Sub ActionID_AfterUpdate()
Me.Action = [ActionID].Column(2)
Me.ActionType = [ActionID].Column(1)
End Sub

This works perfectly fine on one form and whatever ActionID is selected in
the combo box, it puts the corresponding Action and ActionType in the
appropriate boxes. On the second form this only works for the ActionType and
does not fill in the Action. I have checked that both codes are the same, the
table is ok, the bound columns to the combo box are the same. Does anyone
have an idea what else I could check or what is going wrong?

TIA
 
Back
Top