I have a list of account no's on a subform.
I am trying to use a doubleclick on the list to change the value in a combo box on the main form and start some code in the got focus event for the main combobox.
I get a '2110' error (cannot move focus to control) when I try to set focus on cboAccountNo. The control is visible and enabled.
If I debug and press F8, no problem.
Private sub lstNoStatus_DblClick(Cancel as Integer)
Forms!frmCaseEntry.cboAccountNo.Value = lstNoStatus.Value
Forms![frm_CaseEntry].SetFocus
Forms![frm_CaseEntry]![cboAccountNo].SetFocus
end sub
The value of cboAccountNo changes as desired.
The error shows up after the got focus code runs. I have a msgbox in the got focus code.
I am trying to use a doubleclick on the list to change the value in a combo box on the main form and start some code in the got focus event for the main combobox.
I get a '2110' error (cannot move focus to control) when I try to set focus on cboAccountNo. The control is visible and enabled.
If I debug and press F8, no problem.
Private sub lstNoStatus_DblClick(Cancel as Integer)
Forms!frmCaseEntry.cboAccountNo.Value = lstNoStatus.Value
Forms![frm_CaseEntry].SetFocus
Forms![frm_CaseEntry]![cboAccountNo].SetFocus
end sub
The value of cboAccountNo changes as desired.
The error shows up after the got focus code runs. I have a msgbox in the got focus code.