Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Kevin
  Where is Kevin?
 edwardsville
 Illinois - United States
 Kevin
 To: Don Higgins
  Where is Don Higgins?
 Peoria
 Illinois - United States
 Don Higgins
 Tags
Subject: RE: list box combo
Thread ID: 155060 Message ID: 155062 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Sunday, December 23, 2007 6:18:38 PM         
   


> > This is probably another one of those things I don’t understand.
> > But I always have trouble making the combo drop down and list box
> > Work the way I think they should. On the list box if I click one time or arrow through
> > The list I want a method to fire. I have tried putting the code in valid method but it requires a double click for it to fire the method. The click is worse if you just single click through the list it fires the click method for the value that you just left.
> >
> > So what I would like to happen when you single click on a item in the list or arrow through the list it will execute a method for the value I single click on or arrow to
>
>
> Put the code in the INTERACTIVE CHANGE area then.
>
> Don Higgins
>
>
>
>
>

Thanks Don


I must still be doing something wrong the values are coming from the item that I just left not the one that is selected.

This is what I have in the interactive change method

thisform.grid1.RecordSource =space(0)


SELECT Optionsmodel.selected,model.model,;
  Options.desc,options.group,options.grouporder,options.cost,options.margin,options.installed,;
  Optionsmodel.model as model_fk, Optionsmodel.option ;
 FROM ;
     boatsale!optionsmodel ;
    INNER JOIN boatsale!model ;
   ON  Optionsmodel.model = Model.index ;
    LEFT OUTER JOIN boatsale!options ;
   ON  Optionsmodel.option = Options.index;
 WHERE  Optionsmodel.model = findmodel;
 INTO CURSOR optionsmodelcursor READWRITE
 
 thisform.grid1.RecordSource ="optionsmodelcursor"
 thisform.grid1.Refresh 



I have this in my rowsource

select alltrim(model.model),model.group,model.index  ORDER BY  Model.group,model.model from model  into cursor models



control source is findmodel
it is bound to column 3


I just changed to this and it seems to work?
I thought I could use the bound to?

thisform.grid1.RecordSource =space(0)


SELECT Optionsmodel.selected,model.model,;
  Options.desc,options.group,options.grouporder,options.cost,options.margin,options.installed,;
  Optionsmodel.model as model_fk, Optionsmodel.option ;
 FROM ;
     boatsale!optionsmodel ;
    INNER JOIN boatsale!model ;
   ON  Optionsmodel.model = Model.index ;
    LEFT OUTER JOIN boatsale!options ;
   ON  Optionsmodel.option = Options.index;
 WHERE  Optionsmodel.model = models.index;
 INTO CURSOR optionsmodelcursor READWRITE
 
 thisform.grid1.RecordSource ="optionsmodelcursor"
 thisform.grid1.Refresh 


ENTIRE THREAD

list box combo Posted by Kevin @ 12/23/2007 5:55:52 PM
RE: list box combo Posted by Don Higgins @ 12/23/2007 6:08:19 PM
RE: list box combo Posted by Kevin @ 12/23/2007 6:18:38 PM
RE: list box combo Posted by Don Higgins @ 12/23/2007 7:48:01 PM
RE: list box combo Posted by Kevin @ 12/23/2007 8:25:30 PM
RE: list box combo Posted by Don Higgins @ 12/23/2007 8:51:31 PM