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.
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.
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.
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.
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.
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.
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.
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.
> 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.