Combo Box problem 
Author Message
 Combo Box problem

How would one get access to the second column in a combo box? I need
the first column to be record in the data field, but I need the info
in the second column to be related to a second data field.

ie:    combo box shows    narcotic training aid      weight of aid

I need to save the training aid in the field related to the combo box
but need the second column the weight of aid stored into a second
field in the same database.

TIA

Patrick



Mon, 29 Aug 2005 11:23:12 GMT  
 Combo Box problem
Depending on the RowSourceType you could reference the
.RowSource cursor or array or try .ListItem
For example in combo.Valid()
    RetVal = This.ListItem(This.ListIndex,2)

hth
-Stefan



Quote:
> How would one get access to the second column in a combo box? I need
> the first column to be record in the data field, but I need the info
> in the second column to be related to a second data field.

> ie:    combo box shows    narcotic training aid      weight of aid

> I need to save the training aid in the field related to the combo box
> but need the second column the weight of aid stored into a second
> field in the same database.

> TIA

> Patrick



Tue, 30 Aug 2005 16:54:59 GMT  
 Combo Box problem
Hi Patrick:

To expand a little on Stefan's suggestion to use the ListItem property,
take a look at this article.  I think it might be of use in explaining some
of the list box properties more completely:

147846 HOWTO: Gain Access to Items in the ListBox Object
http://support.microsoft.com/?id=147846

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

Quote:
>Depending on the RowSourceType you could reference the
>.RowSource cursor or array or try .ListItem
>For example in combo.Valid()
>    RetVal = This.ListItem(This.ListIndex,2)
>hth
>-Stefan



Quote:
> How would one get access to the second column in a combo box? I need
> the first column to be record in the data field, but I need the info
> in the second column to be related to a second data field.

> ie:    combo box shows    narcotic training aid      weight of aid

> I need to save the training aid in the field related to the combo box
> but need the second column the weight of aid stored into a second
> field in the same database.

> TIA

> Patrick



Wed, 31 Aug 2005 05:33:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Combo Box Problems!!!

2. combo box problem

3. Help! Combo Box Problem

4. combo box problem

5. VFP 3.0 ListBox / Combo box problem

6. drop down combo box problems

7. Combo Box Problem

8. Combo Box Problem

9. Combo Box Problem

10. Combo box problem VFP3.0

11. Urgent: Combo Box problem!!!

12. combo box problem

 

 
Powered by phpBB® Forum Software