.Column Property - Explain How this Works

  • Thread starter Thread starter rl_davis
  • Start date Start date
R

rl_davis

I realize that I should know the following, but for some reason just
having difficulty with understanding how the following code works.

Can someone walk me through this.

I have a combo box that is used to select the carrier for a shipments.
The best I can figure is that If the combo box is not selected then the
Carrier Name is in the first column of the select statement and the
Carrier name is in the second column in the select statement????


Private Sub Text223_AfterUpdate()

If Text223 <> "" Then
CSCAC = Text223.Column(0, Text223.ListIndex)
CName = Text223.Column(1, Text223.ListIndex)
End If

End Sub


This is something I can not seem to get past.

All help is greatly appreciated.

Thanks

Robert
 
I realize that I should know the following, but for some reason just
having difficulty with understanding how the following code works.

Can someone walk me through this.

I have a combo box that is used to select the carrier for a shipments.
The best I can figure is that If the combo box is not selected then
the Carrier Name is in the first column of the select statement and
the Carrier name is in the second column in the select statement????


Private Sub Text223_AfterUpdate()

If Text223 <> "" Then
CSCAC = Text223.Column(0, Text223.ListIndex)
CName = Text223.Column(1, Text223.ListIndex)
End If

End Sub


This is something I can not seem to get past.

What do you mean "If the combo box is not selected..."? If there is no
entry in the ComboBox then there is nothing in ANY of the columns either.
In other words your Combo has multiple columns and you are displaying one of
them. If no selection is made in the ComboBox then all of the columns are
Null.
 
If there is no value selected in the ComboBox, I *think* the ListIndex is
Null and you have problems using the posted code.
 

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

Back
Top