Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Edit Box
Message
From
24/08/2000 21:54:20
 
 
To
24/08/2000 18:54:23
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00409041
Message ID:
00409075
Views:
20
>I have an edit box that lists 2 columns when the pull down is activated. I would like either to search on the first column
>and have the 2nd coumn be used or search on the 2nd column and the first column be used.
>Example:
>Cursor reps - 2 fields repno & rep name
>
>the edit box has the first column repno and I want to search on rep name
>or first column be rep name and I want to search on repno
>
>In any case I want the data found to be repno in the edit box field
>or
>be able to assign the value in repno to a variable
>lcRepno=Thisform.StartRep.Value
>even thought the repno is the 2nd column in the edit box.
>
>Thanks

Combobox, not edit box, unless you know something I don't ;)

To get the 2nd column value into the Value, and therefore the ControlSource field, set these properties..

combo.BoundColumn = 2
combo.BoundTo = .T.

If you don't want to bind the combobox to this column, you can still get the 2nd column value with..

lcRepNo = combo.List(combo.ListIndex, 2)
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform