Nice trick. So
USE companys
SELECT 0
loform=CREATEOBJECT("form")
creates a grid w/o anything?
>Just a quick update - I did not know this before but if you instantiate a grid on a form, it *assumes* the recordsource whatever table/view is open in the current workspace if you do not specify this specifically in the setup e.g.
>
>
>USE companys
>loform=CREATEOBJECT("form")
>loform.AddObject("TestGrid","grid")
>? loForm.testgrid.RecordSource
>
>
>Result: .Recordsource = "companys"
>
>I would have thought .Recordsource would be empty if not explicitly set on the designer screen.
>
>Albert
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]