Hi,
There is one comma missing in your select statement. Change it to:
....
MSELE = " SELECT vendmast.vcode, Purorder.pono, Purorder.input, Purorder.instage, Purorder.output, Purorder.outstage, Purorder.poqty, Purorder.recdqty, Purorder.rejqty," && here is the missing comma at the end.
MSELE = MSELE + " Purorder.poqty - Purorder.mosissue + Purorder.rejqty AS BALQTY FROM gears!vendmast INNER JOIN gears!purorder"
MSELE = MSELE + " ON Vendmast.vcode = Purorder.vcode WHERE Release = 'Y' and Purorder.vcode = mvcode and vendmast.vtype = 'M' INTO CURSOR potab"
*&msele && if still having an such an error uncomment this line in order to execute your select statement.
THISFORM.PAGEFRAME1.PAGE1.GRID1.RECORDSOURCE = msele
THISFORM.PAGEFRAME1.PAGE1.GRID1.RECORDSOURCETYPE = 3
WITH THISFORM
etc...
if still you receive the error then try: &msel just after
Khalil Shaddad (Lebanon)