Hi Gunnar,
>and this is the point where my 'toaster' explodes! up until the point of calling _screen.DbfOpen('access') the datasession is 2 (a private one created from the 'child' form). however, the first line in DbfOpen() (right after the LPara statement) the DS has magically switched back to 1 - the default one.<
_SCREEN.DBFOpen is an object that is contained in the screen. Objects automatically use the DataSession they were created in so..., any methods called in DBFOpen will be in DS1. I never use SET DATASESSION except for debugging. If you need access to a cursor, you must create the objects you need in the datasession you will use them in.
The VFP way of switching datasessions is a very good thing. It's what enables you to say:
Form1.Save()
Form2.Revert()
and have both forms operate in their own DSs without any SET DATASESSION stuff from you.
Charlie