This is the purpose of a private datasession. It Isolates the form from all open sets of data. You need to establish the dataenvironment yourself. A private datasession allows you to simulate multiple users in a client server environment. Like two users in this environment, your forms are unaware of all open datasessions except the one you are opening.
You can sublcass the "Session" object in VFP SP3 or later. Then use that object when instantiating your forms. This will give you one place for the code and allow you to reuse it effectively.
Terry Rooks
Software Systems Architect
Microsoft Certified Solution Developer.Net
If at first you don't succeed, then skydiving definitely isn't for you.