Custom Dashboard on custom tab - Lifecycle

I am able to get the dashboard to display correctly when a "Sales Order" object is clicked. I only want the dashboard and the tab for that matter to show while that sales order is selected. If the user clicks off of the selected sales order I want the dashboard and tab that the dashboard is on to go away. How would I go about doing this?