>In form, I normally add tables from dataenvironment designer. I have created cursor and dataevironment classes. How do I add them in form? I tried with addobject with no success.
>
>Any help would be appreciated.
>
>Manoj
This worked for me
To create the DE object:
Thisform.Addproperty("oDataenv", Createobject("Loadtables"))
and to load the tables:
This.oDataenv.AddObject("myAlias", "Cursor")
With This.DataEnvironment.myAlias
.Alias = "myTable"
.CursorSource = "mrn.dbf"
EndWith
This.oDataenv.OpenTables()
I added this code in the form's init event. Remember to set autoopentables property to .f.
Enmanuel
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain