From: Marcia Akins
Ohio - United States
To: Liviu Antoniu
Visual FoxPro 7
Sunday, October 09, 2005 3:16:07 PM
This message was rated by:
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?
The best way to do this is to create a parameterized view of your table. You can do this very easily in the view designer. Just select the table you want, select the fields, and on the filter tab specify the date field as the field name and put this in as the example: ?vp_date
Use this parameterized view as the grid's RecordSource. If you have put it in the data environment in your form, make sure you set its NoDataOnLoad property to true. If you are opening the view in code, you need to use the NODATA keyword whenyou USE it.
Now, whenever you want to change the data in the grid because you have selected a new date, all you needx is this code:
vp_date vp_date = <<
'<< My View Name >>'
For step by step instructions on how to use the view wizard, see the Local View Wizard topic in the on-line help.
Marcia G. Akins
Tightline Computers, Inc.
Posted by Liviu Antoniu @ 10/9/2005 8:47:39 AM
Posted by Mike Gagnon @ 10/9/2005 12:33:28 PM
Posted by Liviu Antoniu @ 10/9/2005 7:44:38 PM
Posted by Peter Wong @ 10/9/2005 12:50:50 PM
Posted by Liviu Antoniu @ 10/9/2005 7:36:31 PM
Posted by Marcia Akins @ 10/9/2005 3:16:07 PM
Posted by Liviu Antoniu @ 10/9/2005 7:52:02 PM
Posted by Marcia Akins @ 10/9/2005 8:32:28 PM
Posted by Liviu Antoniu @ 10/9/2005 8:38:55 PM