Thanks Jo-Anne,
I need to use code for this as I have several views. The view that opens is determined by a web service that brings back a SQL record that contains a status.
My problem is the Rules run before the code on load so I can't use the rules as my code has not yet determined the status. The code I use ...