How to clear the text in active control if the active form name is “frmCustomer”
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 | 'Controls - How to clear the text in active control if the active form name is "frmCustomer" ' If the current form is frmCustomer, clear the control that has ' the focus. ' On Error is necessary because you can't be sure that it supports ' the Text property, or even that there actually *is* an active ' control. On Error Resume Next If Screen.ActiveForm.Name = "frmCustomer" Then Screen.ActiveControl.Text = "" End If |