by stecenko » Sun Aug 20, 2017 1:44 pm
The 1st form (let's call it the master form) has datasession set to 2, i.e. private, as does the 2nd form (let's call it the slave form).
What happens in a data session stays in a data session.
Why does the slave form require a private data session?
Is it always called from the master form or is it sometimes called from the menu? If it is always called from the master form, is it modal?
If the slave form is never called from the menu, then you can set it's datasession to 1, i.e. default which means use the existing data session in the master form. And set the slave to modal so the user has to exit from it before any further processing can occur.
If the slave is called from the menu, then it isn't really a slave. So you'll have to it in half.
The first half of the slave is private and in that data session, you open the views and tables; in other words, this is another master.
The 2nd half of the old slave remains a slave and its data session is default. It is always called from some master and doesn't care which because the master form creates the proper environment (the data session) for the slave to do its job.
You can see the problem arises when you create a form that is both a master and slave. Now in capitalist societies, a person can be a master to employees and simultaneously a slave to 'bankers and the damn CPR.' But in object oriented programming that's an anomaly, which is driving you nuts.
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052