I have a form with two option buttons - one button for "MOS VENDOR" and another for "OE VENDOR" . Onclick of "MOS VENDOR" option button the combo box should be filtered based on the type of vendor. From the filtered combo the data in the grid has to be filtered in accordance to the type of vendor.
I write the code in the click event of the combo box. I write the following code in the click event of the combo box:
MVCODE = VENDMAST.VCODE
WITH THISFORM
.OVADD.VALUE = VENDMAST.VADD
ENDWITH
WITH THISFORM
.PAGEFRAME1.ENABLED = .T.
.PAGEFRAME1.PAGE1.ENABLED = .T.
.PAGEFRAME1.PAGE1.GRID1.ENABLED = .T.
.PAGEFRAME1.PAGE1.CMDOK.ENABLED = .T.
.PAGEFRAME1.PAGE2.ENABLED = .T.
.PAGEFRAME1.PAGE3.ENABLED = .T.
ENDWITH
LOCAL MSELE
MSELE = ''
IF MSOTYPE = 'MS'
MSELE = " SELECT vendmast.vcode, Purorder.pono, Purorder.input, Purorder.instage, Purorder.output, Purorder.outstage, Purorder.poqty, Purorder.recdqty, Purorder.rejqty"
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"
THISFORM.PAGEFRAME1.PAGE1.GRID1.RECORDSOURCE = msele
THISFORM.PAGEFRAME1.PAGE1.GRID1.RECORDSOURCETYPE = 3
WITH THISFORM
.Pageframe1.Page1.Grid1.Column1.controlsource = potab.pono
.Pageframe1.Page1.Grid1.Column2.controlsource = potab.Input
.Pageframe1.Page1.Grid1.Column3.controlsource = potab.Instage
.Pageframe1.Page1.Grid1.Column4.controlsource = potab.Output
.Pageframe1.Page1.Grid1.Column5.controlsource = potab.Outstage
.Pageframe1.Page1.Grid1.Column6.controlsource = potab.poqty
.Pageframe1.Page1.Grid1.Column7.controlsource = potab.recdqty
.Pageframe1.Page1.Grid1.Column8.controlsource = potab.rejqty
.Pageframe1.Page1.Grid1.Column9.controlsource = potab.Balqty
ENDWITH
ELSE
ENDIF
Here mvcode is the variable provided through the builder for the combo.
On execution i get an error saying "alias potab not found" . Here potab is the cursor name.
I have checked where i have given alias & i am have not given. I have also checked if i have given "rowsource type as 3" which i have given. I checked for loss of records, but i have plenty of records in the tables i have selected. Is there anybody who can help me.
Regards
Vijayendran S