Hi all,

I have a look up table and a master table. The field that link both is
numeric.
I also have a combobox bound to both files, but for some reason it doesn't
display the field values.


my code looks like this


comb1.sourcecode= daily_log.jobn
comb1.rowsourcetype= 3
comb1.rowsource= "select jobname, jobn from jobs into cursor cc1"
comb1.boundColumn= 2

When I navigate the Daily_log the combobox doesn't display anything. What am
I missing??

I have other combobox bound to other tables with a key (type char) and
there is no problem at all.

Another problem is when I define many columns in a combobox it display only
the first one. I checked columncount and columnwidth properties and they are
ok.

comb2.columncount =3
comb2.columnwidth= 200,200,200

TIA

Re: combobox problem by Jack

Jack
Tue Jun 26 23:50:11 CDT 2007

On Tue, 26 Jun 2007 13:53:14 -0400, "Fanor" <xreed2000@yahoo.com>
wrote:

>Hi all,
>
>I have a look up table and a master table. The field that link both is
>numeric.
>I also have a combobox bound to both files, but for some reason it doesn't
>display the field values.
>
>
>my code looks like this
>
>
>comb1.sourcecode= daily_log.jobn
>comb1.rowsourcetype= 3
>comb1.rowsource= "select jobname, jobn from jobs into cursor cc1"
>comb1.boundColumn= 2
>
>When I navigate the Daily_log the combobox doesn't display anything. What am
>I missing??
>
>I have other combobox bound to other tables with a key (type char) and
>there is no problem at all.

For numeric values to work you need to set comb1.BoundTo = .T.
If your VFP is too old to have this property, then you are out of luck
and will have to do it manually. This is a 'feature' of VFP that I
have never understood.

>Another problem is when I define many columns in a combobox it display only
>the first one. I checked columncount and columnwidth properties and they are
>ok.
>
>comb2.columncount =3
>comb2.columnwidth= 200,200,200

Do you understand that multiple columns display only in the drop-down
list?

Re: combobox problem by Fanor

Fanor
Wed Jun 27 08:58:51 CDT 2007

Thank you so much Jack, about the multiple columns i didn't know, but now it
is cristal clear to me

"Jack Jackson" <jacknospam@pebbleridge.com> wrote in message
news:gsq383d1m5e07ib53qlftn753ip742ba8b@4ax.com...
> On Tue, 26 Jun 2007 13:53:14 -0400, "Fanor" <xreed2000@yahoo.com>
> wrote:
>
>>Hi all,
>>
>>I have a look up table and a master table. The field that link both is
>>numeric.
>>I also have a combobox bound to both files, but for some reason it doesn't
>>display the field values.
>>
>>
>>my code looks like this
>>
>>
>>comb1.sourcecode= daily_log.jobn
>>comb1.rowsourcetype= 3
>>comb1.rowsource= "select jobname, jobn from jobs into cursor cc1"
>>comb1.boundColumn= 2
>>
>>When I navigate the Daily_log the combobox doesn't display anything. What
>>am
>>I missing??
>>
>>I have other combobox bound to other tables with a key (type char) and
>>there is no problem at all.
>
> For numeric values to work you need to set comb1.BoundTo = .T.
> If your VFP is too old to have this property, then you are out of luck
> and will have to do it manually. This is a 'feature' of VFP that I
> have never understood.
>
>>Another problem is when I define many columns in a combobox it display
>>only
>>the first one. I checked columncount and columnwidth properties and they
>>are
>>ok.
>>
>>comb2.columncount =3
>>comb2.columnwidth= 200,200,200
>
> Do you understand that multiple columns display only in the drop-down
> list?



Re: combobox problem by Dan

Dan
Wed Jun 27 11:05:42 CDT 2007

Jack Jackson wrote:
> For numeric values to work you need to set comb1.BoundTo = .T.
> If your VFP is too old to have this property, then you are out of luck
> and will have to do it manually. This is a 'feature' of VFP that I
> have never understood.

I'll give you a little background.

Late in the beta of VFP3, Paul Bienick discovered that combos bound to
integer columns were storing unpredictable values. Sometimes it would
properly get its value, other times it would store recno() of its
controlsource and other times it would store ItemID.

When we called MS to report this, we were told "we know -- it's a limitation
of the product". (That's Microsoft-speak for "don't bother us now, we're
trying to make our ship date".

Facing a ship date for Tastrade, we had no choice but to change all PK's to
char. (People often ask why we didn't use int -- in TT or Codebook -- it was
because of combos.)

BoundTo was added later to address the issue, and they really *had* to do it
as a new property or risk breaking backward compatibility.

HTH

Dan



Re: combobox problem by Paul

Paul
Wed Jun 27 17:11:08 CDT 2007


"Dan Freeman" <spam@microsoft.com> wrote in message
news:%232y$HUNuHHA.2752@TK2MSFTNGP06.phx.gbl...
> Jack Jackson wrote:
>> For numeric values to work you need to set comb1.BoundTo = .T.
>> If your VFP is too old to have this property, then you are out of luck
>> and will have to do it manually. This is a 'feature' of VFP that I
>> have never understood.
>
> I'll give you a little background.
>
> Late in the beta of VFP3, Paul Bienick discovered that combos bound to
> integer columns were storing unpredictable values. Sometimes it would
> properly get its value, other times it would store recno() of its
> controlsource and other times it would store ItemID.
>
> When we called MS to report this, we were told "we know -- it's a
> limitation of the product". (That's Microsoft-speak for "don't bother us
> now, we're trying to make our ship date".
>
> Facing a ship date for Tastrade, we had no choice but to change all PK's
> to char. (People often ask why we didn't use int -- in TT or Codebook --
> it was because of combos.)
>
> BoundTo was added later to address the issue, and they really *had* to do
> it as a new property or risk breaking backward compatibility.
>
> HTH
>
> Dan

So that's the story. I always wondered why the combobox was so screwy.