Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox returns Index Number
Message
From
31/05/1999 11:19:54
 
 
To
31/05/1999 04:33:19
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00224614
Message ID:
00224662
Views:
16
Hi Ramil,

I guess you mean the ComboBox1.Value when you say what it "returns". I believe that if you set

ComboBox1.BoundTo = .T.

then your ComboBox1.Value will be your ID data field value and not the .ListIndex.

HTH,
Bonnie

>Does VFP 6 combo box returns the index number instead of the
>field value for datatypes: Integer and Numeric?
>
>Case in point:
>1. CustOrder.ID in CustOrder relates to CUSTMaster.ID in CUSTMaster
>2. ComboBox1.RowSourceType ="3-SQL Statement"
>3. ComboBox1.RowSource = Select CUSTMaster.Name, CUSTMaster.ID from
> CUSTMaster order by CUSTMaster.Name into cursor cCUSTMaster
>4. ComboBox1.BoundColumn =2
>5. ComboBox1.ControlSource =CustOrder.ID
>
>A. If the ID data type is character, ComboBox1 returns the
> actual ID data of the CUSTMaster table which is "00001"
>ex: CUSTMaster.ID ="00001" .Name ="DEF"
>
>B. If the ID data type is numeric, ComboBox1 returns the index
> number of the item in the combolist. In the list "ABC" is
> shown first and the index is 2. ComboBox1 returns 2 if "ABC"
> is clicked
>ex: CUSTMaster.ID =2 .Name ="ABC", .ListIndex =1
> CUSTMaster.ID =1 .Name ="DEF" .ListIndex =2
>
>
>Anybody, please confirm if this is the case.
>
>Thanks, Ramil Alcano 5/31
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform