Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: BZ Dusk
  
 
 
 BZ Dusk
 To: Bill von Valtier
  
 Rochester
 
 Bill von Valtier
 Tags
Subject: RE: Grid & Filter problem
Thread ID: 16009 Message ID: 16013 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Sunday, October 06, 2002 7:56:43 PM         
   


> Hello Friends and Mentors,
>
> I am having the following problem: I can't seem to make a grid filter work correctly.
>
> The setup: I have a Form with (among others) a five-column Grid control, which includes a character field (on which it is indexed) and a date field whose date is to be selected/changed by the operator. My problem is that I have tried three different approaches and failed with all, viz: 1) Set a Filter to the requisite date, or 2) include the filter in the index with a FOR clause; or 3) use a SELECT as the RecordSourceType. I don't have any problem with the mechanics of the code for each of these, but I think my problem is that I don't know WHERE to do it/put it. And which of those three is the better method as a general rule?
>
> In case it is important: I am loading the table with DataEnvironment settings, not code. I am using VFP6 in Win98.
>
> TIA
>
> BillvV
> Rochester, Michigan

Hi!

You mean you have a column in your grid where user can select dates and filter that same grid based on what the user selected?

If you have a control outside your grid example combo box which drop down dates where user can select from, you may use the 3rd method - select statment. Put the code on the combobox interactivechange event, example thisform.grid1.recorsource = 'select ....from...where...into cursor myCursor order by ....'

Hope this helps.

BZ

ENTIRE THREAD

Grid & Filter problem Posted by Bill von Valtier @ 10/6/2002 7:06:06 PM
RE: Grid & Filter problem Posted by liew wai foong @ 10/6/2002 7:50:15 PM
RE: Grid & Filter problem Posted by BZ Dusk @ 10/6/2002 7:56:43 PM