Murray Brown
asked on
Access VBA Can't set focus
Hi
In my Access VBA I run the following code behind a Combo Box and I get the error
"Can't set focus to Customer_Code"
What am I doing wrong?
In my Access VBA I run the following code behind a Combo Box and I get the error
"Can't set focus to Customer_Code"
What am I doing wrong?
Private Sub xcmbCustomer_AfterUpdate()
On Error GoTo EH
'-----------------------------
Dim oCustomerCode As String
DoCmd.SetWarnings (False)
oCustomerCode = Me.xcmbCustomer.Text
Me.Customer_Code.SetFocus
Me.Customer_Code.Text = oCustomerCode
Call oInsert_New_Invoice_Number 'eg 2018-001
DoCmd.SetWarnings (True)
'-----------------------------
Exit Sub
EH:
MsgBox Err.Description
End Sub
Is the control Customer_Code enabled?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much