Hi!
Data environment is used to open views/tables when form starts. When you create form programmatically, no need in this - you can just open all views/table programmatically too without any limitations. Just look to the USE command in the help - it openss views and tables by a command.
To create form programmatically - its depended on what you're going to do. Usually it is enough to create a form class, put controls on it, add code to Init event to open required views and tables and add any other code required. Then
m.oMyForm = createobject("MyFormClass")
m.oMyForm.SHOW()
Note that if form is not modal, you require to make oMyForm variable public.
HTH.
>Hi all,
>
>How can I create a form programmtically and add some views also programmatically.
>
>Thanks in advance
>
>Peter
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.