> Below is my coading, but it show error message (c:\<my project>\sales.dbf does not exit)what i do worng
>
> CREATE CURSOR sales (slsno c(10), loc c(10), stcode c(20), barcode c(20), colour c(6), size c(6), desc1 c(50) ,;
> desc2 c(50), desc3 c(50), qty n(16,2), price n(16,2), disper n(16,2), disamt n(16,2), amount n(16,2))
>
>
> thisform.pageframe1.page1.grid1.RecordSource = sales
When you assign it programmatically, you would need quotes:
thisform.pageframe1.page1.grid1.RecordSource = sales
On the other hand, missing quotes would cause a "Variable not found" error.
So my guess is that you created the cursor in another datasession, for instance in another method before you do the "Do Form" command?
FWIW, when you want to avoid the "grid reconstruction" that Tushar mentioned, you can probably use a "Parameterized Local View" instead of assigning a temp cursor at runtime.
hth
-Stefan