The following example uses the BeforeClose event to close the Customers and Prospects lookup window when the Customer Maintenance window closes:
Private Sub Window_BeforeClose() If CustomersandProspects.IsLoaded = True Then CustomersandProspects.Close End If End Sub