IF LASTKEY() = 13
SELECT CUSTOMER
SET ORDER TO C_SNAME
THISNAME=UPPER(ALLTRIM(THIS.VALUE))
COUNT ALL FOR CUSTOMER.C_SNAME=THISNAME TO NUMBR
IF NUMBR > 0
SEEK THISNAME
IF FOUND()
WAIT WINDOW "found" NOWAIT
IF NUMBR>1
BROW FOR CUSTOMER.C_SNAME=THISNAME TITLE "Select Customer"
ENDIF
LOOKCUS=CUSTOMER.CNUM
SELECT VALUATION
COUNT ALL FOR VALUATION.CNUM = LOOKCUS TO MATCHING
IF MATCHING > 0
SELECT PICNAM, CNUM, INVNO, ARTIST, VPW, VPH, PICTOT FROM VALUATION WHERE CNUM = LOOKCUS INTO CURSOR YORPICTURES
SELECT YORPICTURES
BROW
ENDIF
ENDIF
ELSE
WAIT WINDOW " notfound" NOWAIT
M=MESSAGEBOX("Name not found",48,"System Message")
LOOKINV=0
LOOKCUS=""
ENDIF
THISFORM.REFRESH
THIS.VALUE=''
ENDIF
[code]
This section is in a text box within the form. A surname is entered, all matching surnames are displayed in a browse window. The required one is selected, hit ESC, all the items purchased by that customer are displayed in another browse window (this browse is just to verify that there is matching data).
Clearing this browse window should display the same data within the grid, who's recordsource property is set to YORPICTURES but the grid just appears as an empty white box.
The grid's recordsource is set correctly as it displays first time round but why does it not display the second time?
This really is frustrating.
Keith
[URL unfurl="true"]www.studiosoft.co.uk[/URL]