Combo Box After Update Event

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
 
G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top