Expanding on what Tracey said ... On the combo use these properties
Boundcolumn = 2 Columncount = 2 Columnwidths = 100,0 RowSource = "stypecombo.desc, code" RowSourceType = 6 *- Assuming Stocks.dbf has an index on code. Set order to CODE in stocks && Or whatever is appropriate Select desc, code from stypes order by code into cursor stypecombo *- In form INIT or someplace appropriate Go top in stypecombo Set key to (stypecombo.Code) in stocks Go top in stocks Thisform.grdStocks.refresh() && Assuming gdrStocks is the name and it is on the form. *- In the InteractiveChange of the Combobox Dodefault() Set key to (this.value) in stocks Go top in stocks Thisform.grdStocks.refresh() > > Set the controlsource and rowsource accordingly. > > Let us know how it worked out. > > > -- > Tracy > -----Original Message----- From: ProfoxTech [mailto:[email protected]] On Behalf Of Sytze de Boer Sent: Sunday, 18 August 2013 11:59 AM To: [email protected] Subject: Re: Combo Box problems Sorry Tracey. Made no difference. Another real baffling thing is that no matter what I do, the top row in the grid displays a wrong record. After the Valid in the combo box, I "set filter" and go top. The top row is not per filter condition. What's worse, it displays the top row because it somehow replaces the stocktype with the filter condition. This has me completely bamboozled. On Sun, Aug 18, 2013 at 2:07 AM, Tracy Pearson <[email protected]>wrote: > Sytze de Boer <[email protected]> wrote: > >I have a Stocks.dbf with about 90,000 items There's about 80 stock > >types in there which can be referenced in STYPES.dbf (code N(5), Desc > >C(25) > > > >I have a grid with all the stocks, and to limit the display, I have a > >combobox, and a "set key" command in the valid of the combobox > > > >I have 2 problems > >In the 1st instance, in order to show both the code and desc in the > >combobox I thought i would create a memvar. > >With 80 in the stypes.dbf, this ended up with a memvar length >1000 > >so it did not display properly. > >So now I set the rowsourcetype as 2-Alias. > >It display just the code, no description, unless the user actually > >Drops Down I think I can live with this > > > >But, when the user clicks on the drop down, it immediately jumps to > >the 1st item in Stypes.dbf, and the user has to click the dropdown a > >second time to choose the desired stypes.code > > > >I can't figure why the user has to click twice > > I would use this select as the combo record source > > Select desc, code from stypes into cursor stypecombo > > On the combo use these properties > Boundcolumn = 2 > Columncount = 2 > Columnwidths = 100,0 > > Set the controlsource and rowsource accordingly. > > Let us know how it worked out. > > > -- > Tracy > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.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.

