>Hi Nick
>
>Corection to my last post,
>
>1-when i run the sql-statement it open's the browse, and don't display the records in grid - i put grid recordsourcetype as sql-statement
>
This is correct, because I showed only SQL SELECT itself, it is up to you how to use it - you can add
... INTO CURSOR myCursor
and use myCursor as RecordSource for the grid ( better use RecordSourceType 1- Alias )
Or you can create the view from your SQL (even programmatically -
CREATE SQL VIEW myView AS < your SQL SELECT goes here > )
and use myView as a RecordSource (also RecordSourceType 1- Alias)
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison