Loading a Packing slip programmatically on the ReceiptEntryForm

I am currently making a customization of the ReceiptEntryForm where I’m adding a button that will automatically create a new packing slip for the selected PO, and then that new packing slip will be loaded on the current form. For now It can create the new packing slip and save it, but i can’t find a way to properly load it in the form right after.

Here’s what I have :

var SearchView = ((EpiDataView)(this.oTrans.EpiDataViews["MultiKeySearch"]));

	if(SearchView.Row >= 0)
	{
		if((int)SearchView.dataView[SearchView.Row]["PONum"] > 0)
		{
			ReceiptAdapter ReceiptAdp = new ReceiptAdapter(oTrans);
			ReceiptAdp.BOConnect();
			ReceiptAdp.GetNewRcvHead((int)SearchView.dataView[SearchView.Row]["VendorNum"], "");
			ReceiptAdp.ReceiptData.RcvHead.Rows[0]["PONum"] = (int)SearchView.dataView[SearchView.Row]["PONum"];				
			ReceiptAdp.ReceiptData.RcvHead.Rows[0]["PackSlip"] = "SYN001";
			ReceiptAdp.Update();

			ReceiptAdp.Dispose();
			ReceiptAdp = null;

			SearchView.dataView[SearchView.Row].BeginEdit();
			SearchView.dataView[SearchView.Row]["PackSlip"] = "SYN001";
			SearchView.dataView[SearchView.Row].EndEdit();

			oTrans.Update();
			oTrans.Refresh();
		}
	}

The PackSlip field will contain the string I gave it but no actual record will be loaded, even if I go on it and press tab to leave, nothing change. I added the Update and refresh but that didn’t change. When I tested and changed the PO number on the MultiKeySearch instead in the code, it did load the PO information properly. If I click to search a packing slip the new one “SYN001” is present and will load that way. But I’d want it to load automatically, is there any way?

Thanks

Solved by simply changing the packingslip textbox content like the user would manually do instead of changing the epidataview, and the data is loaded.

TextBox.Focus();
TextBox.Text = "SYN001";
TextBox.EndUpdate();
//and then focus on another control but I'm not sure if it's necessary