OK, so I am interpreting that this is your question.
You have a parent table and it has a two forms. You launch and Add Child button off a Parent record and you want to make sure that when the child record is saved that you land the user in display mode on the specified form that you want.
I do not know of any way to actually detect what form the user is launching off of but I guess since you have different forms you can have different buttons for add child.
The syntax here should return the user to form number 10 on the parent record.
var text AddChild = URLRoot() & "db/" & [_DBID_COMMUNICATION_PLAN] & "?a=API_GenAddRecordForm&_fid_13=" & URLEncode ([Project Number]);
var text ReturnToFormTen = URLRoot() & "db/" & dbid() & "?a=dr&dfid=10&rid=" & [Record ID#];
$AddChild
& "&NextURL=" & URLEncode($ReturnToFormTen)
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------