Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Peter Wong
  Where is Peter Wong?
 
 Hong Kong
 Peter Wong
 To: Liviu Antoniu
  Where is Liviu Antoniu?
 bucharest
 Romania
 Liviu Antoniu
 Tags
Subject: RE: grid
Thread ID: 78816 Message ID: 78826 # Views: 1 # Ratings: 1
Version: Visual FoxPro 7 Category: Grids
Date: Sunday, October 09, 2005 12:50:50 PM         
   


> Hello guys!
> I'm a beginner in VFP and I need help. I have a grid who
> display records of one table. I want to display only some records.
> mytable contains the next records:
> customers, id_cust, date_invoice, date_bank, etc.
> I need to view in a grid only records with date_bank = variable. How make this?
> Please help me!
>
> Liviu


Hi Antoniu,
Just add a text or combo control and a command button to your form,

set variable to the input, e.g.

date_bank_ser=thisform.combo1.displayvalue
in the command button's click event write :
select * from yourtable where yourtable.date_bank=date_bank_ser into cursor nameyoulike
thisform.yourgrdname.recordsource="nameyoulike"
thisform.refresh

if you want to control the appearence of your grid, dont forget to write commands to control the columns' width

keep work hard !

Peter from S.A.R. not SARS

ENTIRE THREAD

grid Posted by Liviu Antoniu @ 10/9/2005 8:47:39 AM
RE: grid Posted by Mike Gagnon @ 10/9/2005 12:33:28 PM
RE: grid Posted by Liviu Antoniu @ 10/9/2005 7:44:38 PM
RE: grid Posted by Peter Wong @ 10/9/2005 12:50:50 PM
RE: grid Posted by Liviu Antoniu @ 10/9/2005 7:36:31 PM
RE: grid Posted by Marcia Akins @ 10/9/2005 3:16:07 PM
RE: grid Posted by Liviu Antoniu @ 10/9/2005 7:52:02 PM
RE: grid Posted by Marcia Akins @ 10/9/2005 8:32:28 PM
RE: grid Posted by Liviu Antoniu @ 10/9/2005 8:38:55 PM