I want to view different queries in a Grid.
In the LOAD method of a FORM, I have the following SQL code to display data in a grid.
SELECT cutomer.name,order.invno ;
FROM customer,orders ;
WHERE customer.custid_no = orders.custid_no and customer.name = "FRANK" (or a variable) ;
ORDER BY customer.datebilled ;
INTO CURSOR mycursor
I set the grid RecordSourceType property to 1-Alias and
RecordSource to mycursor. The grid SHOWS THE DATA FINE.
HOWEVER, in the Click Method of a command button in the form, to query a different name I tried the following:
SELECT cutomer.name,order.invno ;
FROM customer,orders ;
WHERE customer.custid_no = orders.custid_no and ; customer.name = "JOHN" (or a variable) ;
ORDER BY customer.datebilled ;
INTO CURSOR mycursor
Thisform.refresh
The grid goes blank and I can't view the results. Does anyone know why it does'nt work. Thanks
In the LOAD method of a FORM, I have the following SQL code to display data in a grid.
SELECT cutomer.name,order.invno ;
FROM customer,orders ;
WHERE customer.custid_no = orders.custid_no and customer.name = "FRANK" (or a variable) ;
ORDER BY customer.datebilled ;
INTO CURSOR mycursor
I set the grid RecordSourceType property to 1-Alias and
RecordSource to mycursor. The grid SHOWS THE DATA FINE.
HOWEVER, in the Click Method of a command button in the form, to query a different name I tried the following:
SELECT cutomer.name,order.invno ;
FROM customer,orders ;
WHERE customer.custid_no = orders.custid_no and ; customer.name = "JOHN" (or a variable) ;
ORDER BY customer.datebilled ;
INTO CURSOR mycursor
Thisform.refresh
The grid goes blank and I can't view the results. Does anyone know why it does'nt work. Thanks