Index
2012-03-13 12:04 – Jeff Johnson : Return Combo Value not Index
2012-03-13 12:12 – Allen : Re: Return Combo Value not Index
2012-03-13 12:14 – Allen : Re: Return Combo Value not Index
2012-03-13 12:14 – Frank Cazabon : Re: Return Combo Value not Index
2012-03-13 12:15 – Dave Crozier : RE: Return Combo Value not Index
2012-03-13 12:25 – Jeff Johnson : Re: Return Combo Value not Index
2012-03-13 15:57 – Christof Wollenhaupt : Re: Return Combo Value not Index
2012-03-13 16:05 – Stephen Russell : Re: Return Combo Value not Index
2012-03-14 07:36 – Christof Wollenhaaupt : Re: Return Combo Value not Index
Back to top
Return Combo Value not Index

Author: Jeff Johnson

Posted: 2012-03-13 12:04:18   Link

I keep forgetting how to use combo boxes for some reason. Let's say I

have a list of clients in column 1 and their PK's in column 2. When I

select a client, column 2 (the bound column) returns the list index and

not the PK. How do I get the value of column 2 and not the list index.

TIA

--

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/4F5F7E12.6030902@san-dc.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Jeff Johnson
Back to top
Re: Return Combo Value not Index

Author: Allen

Posted: 2012-03-13 12:12:56   Link

Quick stab

DisplayValue ?

Al

-----Original Message-----

From: Jeff Johnson

Sent: Tuesday, March 13, 2012 6:04 PM

To: profoxtech@leafe.com

Subject: Return Combo Value not Index

I keep forgetting how to use combo boxes for some reason. Let's say I

have a list of clients in column 1 and their PK's in column 2. When I

select a client, column 2 (the bound column) returns the list index and

not the PK. How do I get the value of column 2 and not the list index.

TIA

--

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/E10C96A444F24FA3A95BBB2F2B31E429@gslredacer

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Allen
Back to top
Re: Return Combo Value not Index

Author: Allen

Posted: 2012-03-13 12:14:14   Link

oops no good, DisplayValue only returns first

Al

-----Original Message-----

From: Jeff Johnson

Sent: Tuesday, March 13, 2012 6:04 PM

To: profoxtech@leafe.com

Subject: Return Combo Value not Index

I keep forgetting how to use combo boxes for some reason. Let's say I

have a list of clients in column 1 and their PK's in column 2. When I

select a client, column 2 (the bound column) returns the list index and

not the PK. How do I get the value of column 2 and not the list index.

TIA

--

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/1B9160802248450B9E08CA61284F6FF5@gslredacer

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Allen
Back to top
Re: Return Combo Value not Index

Author: Frank Cazabon

Posted: 2012-03-13 12:14:43   Link

Jeff,

If column 2 is a numeric column you need to set the BoundTo property to

.T. (or .F. can't remember at the moment as I don't use combos at all)

Frank.

Frank Cazabon

On 13/03/2012 01:04 PM, Jeff Johnson wrote:

> I keep forgetting how to use combo boxes for some reason. Let's say I

> have a list of clients in column 1 and their PK's in column 2. When I

> select a client, column 2 (the bound column) returns the list index and

> not the PK. How do I get the value of column 2 and not the list index.

>

> TIA

>

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/4F5F8083.4030405@gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Frank Cazabon
Back to top
RE: Return Combo Value not Index

Author: Dave Crozier

Posted: 2012-03-13 12:15:49   Link

You must set the "Bound To" property to .T.

As a matter of interest how are you populating the combo, an SQL statement?

Dave

-----Original Message-----

From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf Of Jeff Johnson

Sent: 13 March 2012 17:04

To: profox@leafe.com

Subject: Return Combo Value not Index

I keep forgetting how to use combo boxes for some reason. Let's say I have a list of clients in column 1 and their PK's in column 2. When I select a client, column 2 (the bound column) returns the list index and not the PK. How do I get the value of column 2 and not the list index.

TIA

--

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/BD031ECABF2B60499200AAB3DBB4A999921F7D45@EX-A-FPL.FPL.LOCAL

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Dave Crozier
Back to top
Re: Return Combo Value not Index

Author: Jeff Johnson

Posted: 2012-03-13 12:25:44   Link

I am populating an array with an SQL statement. Setting the bound to =

.t. works!

Thanks guys!

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

On 03/13/2012 10:15 AM, Dave Crozier wrote:

> You must set the "Bound To" property to .T.

>

> As a matter of interest how are you populating the combo, an SQL statement?

>

> Dave

>

>

> -----Original Message-----

> From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf Of Jeff Johnson

> Sent: 13 March 2012 17:04

> To: profox@leafe.com

> Subject: Return Combo Value not Index

>

> I keep forgetting how to use combo boxes for some reason. Let's say I have a list of clients in column 1 and their PK's in column 2. When I select a client, column 2 (the bound column) returns the list index and not the PK. How do I get the value of column 2 and not the list index.

>

> TIA

>

> --

> Jeff

>

> ---------------

>

> Jeff Johnson

> jeff@san-dc.com

> (623) 582-0323

>

> www.san-dc.com

>

>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/4F5F8318.1070307@san-dc.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Jeff Johnson
Back to top
Re: Return Combo Value not Index

Author: Christof Wollenhaupt

Posted: 2012-03-13 15:57:40   Link

Numeric data isn't a good choice for the combo box... <s> Internally the

combobox control is using strings only. You can easily see the effect when

the rowsource is N(10,2) and the controlsource is I. Because one results in

"1.00" and the other in "1" it seems like the combobox isn't accepting any

value at all.

Christof

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/CAL4QJhhQ0dNNBvpPWh19G0HzDA4WV6kFpo_cD2hdycc2UjtDHw@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Christof Wollenhaupt
Back to top
Re: Return Combo Value not Index

Author: Stephen Russell

Posted: 2012-03-13 16:05:33   Link

On Tue, Mar 13, 2012 at 3:57 PM, Christof Wollenhaupt

<christof.wollenhaupt@foxpert.com> wrote:

> Numeric data isn't a good choice for the combo box... <s> Internally the

> combobox control is using strings only. You can easily see the effect when

> the rowsource is N(10,2) and the controlsource is I. Because one results in

> "1.00" and the other in "1" it seems like the combobox isn't accepting any

> value at all.

>

----------------------------

A combo box is just a draping for the data it contains. You define

the presentation as well as value. You can define what element your

value is can't you? This way the value could be an Int or Char.

--

Stephen Russell

901.246-0159 cell

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/CAJidMYLTp9Dm04WV8Oqh4VLOC_Np+-oHqmpR-1cxKm7o00yXWQ@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Stephen Russell
Back to top
Re: Return Combo Value not Index

Author: Christof Wollenhaaupt

Posted: 2012-03-14 07:36:39   Link

> A combo box is just a draping for the data it contains. You define

> the presentation as well as value. You can define what element your

> value is can't you?

No. Whatever you specify in the RowSource property is loaded into the List member array which is a character array. The RowSource can be any data type, but is always converted into a character value. In order to match the value, the ControlSource must be converted in the same way.

Christof

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/19ED57EB-5E69-4C48-A5FE-1997BAE4ADF5@foxpert.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Christof Wollenhaaupt