if type( "_Screen.ActiveForm" ) = "O" x = _Screen.ActiveForm.Caption endifWhy a global variable? Global variables are generally not a good idea. Maybe you can use an application-wide object (like _Screen.oApp), and then use a property inside it to hold this (if it's really needed).