Hi Ron,
>I have a grid on a form that I want to populate using a selected portion of the records in a table. Basically, when a person logs on I find their logon ID and get the records from the table that match.
>
>I thought the best way to do this was with a query and made that the recordsourcetype of the grid. But in my form controls that refresh the query, I am running into a select problem. I want to issue a SELECT this.field, that.field FROM mytable INTO query.qpr WHERE name = thename.
>
>Foxpro reports that the code has a syntax error and I find it is related to the INTO clause. And Intellisense doesn't seem to allow an INTO for a query, only for a cursor or array.
>
>What am I doing wrong, or is there a better way to fill the grid.
>
>TIA
Try:
SELECT this.field, that.field FROM mytable WHERE name = thename INTO TABLE query
In this case, VFP will generate a DBF file. You can change "Into Table" for "Into Cursor" for VFP to generate a cursor.
Good luck!
Erick
Força Sempre!
Strength Always!