I was wondering if it is possible to change the datasession in a form from default to private
depending on where it was called from?It seems to me that there are occassions where you want a form to share the data session of some calling form. If this is what you are trying to do, set the child form's data session to 2-Private DataSession and when it needs to share the data session of some calling form, just pass the caller's DataSessionID to the child form in its Init(). Then you can you code like this in the child form's Init() to change the DataSession in which it is operating:
LPARAMETERS tnDS_id
IF NOT EMPTY( tnDS_id )
SET DATASESSION TO tnDS_id
ENDIF