Hello
I have a single form, and want to require the user to make a selection
from a serialnumber ComboBox before being allowed to enter any other
textboxes. Also, the user should be allowed to click on an Exit button
I created and get a response.
The following code works fine without the ExitButton issue:
Private Sub SerialCombo_Exi t(Cancel As Integer)
Dim Ctl As Control
If IsNull(SerDevCo mbo) Then
MsgBox "You must enter a serial#"
Me.AnyOtherFiel d.SetFocus 'acts as a refresh
Me.SerialCombo. SetFocus 'return to field since it is empty
End If
End Sub
MY PROBLEM IS INCLUDING THE CHECK FOR a change of focus when
clicking on the ExitButton. I tried many different methods.
If Not (Screen.ActiveC ontrol.Name <> "ExitButton ") Then
ThankYou
I have a single form, and want to require the user to make a selection
from a serialnumber ComboBox before being allowed to enter any other
textboxes. Also, the user should be allowed to click on an Exit button
I created and get a response.
The following code works fine without the ExitButton issue:
Private Sub SerialCombo_Exi t(Cancel As Integer)
Dim Ctl As Control
If IsNull(SerDevCo mbo) Then
MsgBox "You must enter a serial#"
Me.AnyOtherFiel d.SetFocus 'acts as a refresh
Me.SerialCombo. SetFocus 'return to field since it is empty
End If
End Sub
MY PROBLEM IS INCLUDING THE CHECK FOR a change of focus when
clicking on the ExitButton. I tried many different methods.
If Not (Screen.ActiveC ontrol.Name <> "ExitButton ") Then
ThankYou
Comment