C
Clay Forbes
When i click on mmy command button an error message comes up telling
me that i can only reference a control if it has focus. How can i fix
that?
Here is the code for that command button:
Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
If Combo3.Text = "" Then
Label16.Visible = True
ElseIf Combo7.Text = "" Then
Label17.Visible = True
Else
DoCmd.GoToRecord , , acNewRec
End If
Exit_Command11_Click:
Exit Sub
What is wrong with that code that causes an error? How can i fix it?
me that i can only reference a control if it has focus. How can i fix
that?
Here is the code for that command button:
Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
If Combo3.Text = "" Then
Label16.Visible = True
ElseIf Combo7.Text = "" Then
Label17.Visible = True
Else
DoCmd.GoToRecord , , acNewRec
End If
Exit_Command11_Click:
Exit Sub
What is wrong with that code that causes an error? How can i fix it?