Hi,
You are mixing mySQL syntax and PHP by the looks of it. Ideally you should be using parameters rather than inline PHP values however, your syntax should look something like this:
$query_rsFilter4Email = "SELECT tblcases.ContactAssignedTo, tblcontacts.ContactEmail, tblcases.CaseID FROM tblcontacts Inner Join tblcases On tblcases.ContactAssignedTo = tblcontacts.ContactID WHERE tblcases.CaseID = ".$_SESSION['tblcases_CaseID2']." ORDER BY tblcases.CaseID Desc ";
This is assuming that the session you are creating within the WA Insert behaviour is called tblcases_CaseID2.
This recordset also needs to come after the Insert behaviour so that the Session Variable exists. If you are running this on the same page as the form (i.e posting the form to itself) then you will also want to wrap this new recordset in a trigger such as the one used by the Insert Behaviour so that the recordset is only called when the form is posted.
Hope that makes sense!?
Cheers
Ian