To Display data in title bar of form in axapta you can add data to form design caption . This is the simple example to show Id in axapta form.
CustTable custTable;
Select custTable where custTable.AccountNum ='A101'
element.design().caption(custTable.AccountNum_Id);