>I want intercept the VFP action into a try/catch/entry
>without show the Open dialog for this commands.
>
>SELECT 0
>SELECT * FROM ALIAS()
>GO TOP
>SET FILTER TO A=B
>* ......
>
>
>Thanks
>
Fabio,
VFP will automatically open the file whose primary portion of the file name matches the alias used in the FROM clause if the alias is currently not used. If, in searching the VFP path, it does not find it, it presents the open file dialog so that the user may locate it. This behavior has been present at least since Fox 2.0, so it is old and well known.
The workaround is simple, check to assure that the alias is in use using the USED() command. If it's not open the file. I use a function that returns a boolean value indicating whether or not the attempt to open a table succeeds. Something similar should be used here.
George
Ubi caritas et amor, deus ibi est