This works, so I don't know what else to tell you.

* combo Init
CREATE CURSOR test (id i,name c(50))
INSERT INTO test VALUES (178,"BV ALLEGHENY WOOD PRODUCTS
         ")
INSERT INTO test VALUES (179,"BV BLUE TRIANGLE HARDWOODS
         ")
INSERT INTO test VALUES (180,"BV BROWNLEE LUMBER COMPANY
         ")
INSERT INTO test VALUES (181,"BV BWP HARDWOODS
         ")
INSERT INTO test VALUES (182,"BV CAMERON LUMBER LLP
         ")
INSERT INTO test VALUES (187,"BV CUMMINGS LUMBER COMPANY INC
         ")
INSERT INTO test VALUES (189,"BV D&D WOOD SALES, INC
         ")
INSERT INTO test VALUES (204,"BV DIXIE LYON LUMBER COMPANY
         ")
INSERT INTO test VALUES (193,"BV DWIGHT LEWIS LUMBER COMPANY
         ")
INSERT INTO test VALUES (210,"BV EAST COAST LUMBER
         ")
INSERT INTO test VALUES (156,"LH ANDREWS FOREST PRODUCTS, INC.
         ")
INSERT INTO test VALUES (128,"LH BOIS AISE DE MONTREAL INC
         ")
INSERT INTO test VALUES (121,"LH BRADFORD FOREST
         ")
INSERT INTO test VALUES (4,  "LH BRANDON DISTRIBUTORS, INC.
         ")
INSERT INTO test VALUES (161,"LH CAREAU BOIS
         ")
INSERT INTO test VALUES (146,"LH CENTRE PALLETS, LLC
         ")
INSERT INTO test VALUES (69, "LH CLARKBURGER  LUMBER
         ")
INSERT INTO test VALUES (172,"LH COLONIAL FOREST PRODUCTS
         ")
INSERT INTO test VALUES (72, "LH CORNERSTONE FOREST
         ")
INSERT INTO test VALUES (133,"LH CROPPER BROTHERS LUMBER
         ")
this.ColumnCount = 6
m.cContact = "Joe Blow"
m.cCity = "Phoenix"
m.cState = "AZ"
m.cZip = "85000"
SCAN ALL
  m.cTemp = CHRTRAN(test.name,CHR(32),CHR(160))
  this.AddItem(m.cTemp)
  this.AddListItem(m.cContact,this.NewIndex,2)
  this.AddListItem(m.cCity,this.NewIndex,3)
  this.AddListItem(m.cState,this.NewIndex,4)
  this.AddListItem(m.cZip,this.NewIndex,5)
  this.AddListItem(TRANSFORM(test.id),this.NewIndex,6)
ENDSCAN
this.ListIndex = 1
this.BoundColumn = 6


* combo KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode=32
  NODEFAULT
  DODEFAULT(160,nShiftAltCtrl)
ENDIF
Fred



On Wed, Nov 24, 2010 at 4:29 PM, MB Software Solutions, LLC
<[email protected]> wrote:
> On 11/24/2010 5:18 PM, Fred Taylor wrote:
>> You can only search by the first field in a combo box, in your case,
>> the ID.  You'd have to make the 2nd column the first in order to
>> search using the "space" trick.
>
> Well, actually the first field IS the cName value.  I had just pasted
> that from my SQLYog program.  Here's my code showing that the cName
> field is the first column:
>
>     PROCEDURE cbodist.Init
>         LOCAL lcName as String
>         SELECT vluDist
>         SCAN FOR nactive=1
>             lcName = CHRTRAN(vluDist.cName,CHR(32),CHR(160))
>             this.additem(lcName)
>             this.AddListItem(cContact,this.NewItemId,2)
>             this.AddListItem(cCity,this.NewItemId,3)
>             this.AddListItem(cState,this.NewItemId,4)
>             this.AddListItem(cZip,this.NewItemId,5)
>             this.AddListItem(ALLTRIM(STR(iid)),this.NewItemId,6)
>         ENDSCAN
>     ENDPROC
>
> The BoundColumn is 6 -- the iid field.  Still possible or no?
>
>
>
> --
> Mike Babcock, MCP
> MB Software Solutions, LLC
> President, Chief Software Architect
> http://mbsoftwaresolutions.com
> http://fabmate.com
> http://twitter.com/mbabcock16
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
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/[email protected]
** 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.

Reply via email to