Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid row source

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
Could someone please point me to a 'grid' tutorial rather than the limited information in the VFP6 reference books.
I am using a cursor to update a grid but having trouble with the data source.
Q1 - Do I set the row source or individual column sources
Q2 - Updating the cursor blanks the whole grid.
This is mentioned on a number of web sites and the cure is to keep the data source 'open' rather than create a new one each time.
NEWSALES - is the cursor containing the query results.
WEEKSALES - is an existing table.
before the query
Code:
ThisForm.Grid1.RECORDSOURCE=''
after the query
Code:
SELECT WEEKSALES
SET SAFETY OFF
ZAP
SET SAFETY ON
APPEND FROM DBF('NEWSALES')
ThisForm.Grid1.RECORDSOURCE='WEEKSALES'
This partially works but the final line creates a new alias for WEEKSALES each time it is updated and fails on the ZAP command as in wrong work area.
Where am I going wrong please?

Keith
 
Solved it
Didn't need to reset the row source when using an existing table.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top