>I would like to take some views out of my DE and use them only when I need them. I took one view out of my DE for a test and I am using this piece of code behind my print button.
>
>if not used(viewname)
> use (viewname) in 0
>else
> requery(viewname)
>endif
>
>I am getting the error file does not exist.
>
>With out this peice of code and the view in the DE eveything works fine.
>
>What I am doing wrong here.
>
>Thanks Randy
Is the view name a long name? Is the Database the current DB? If you are using a private Datasession, the SET DATABASE TO is scoped to each private DS. Which means your base form class has to include SET DATABASE TO MYDBC along wiht all the other things scoped to the DS (see VFP help on SET DATASESSION for all the SETs that scope to DS). All you may need to do is change the use command to
use mydbc!myviewname
Mark McCasland
Midlothian, TX USA