Hello everyone -
Can anyone tell me why I can't set focus on a text box after I update a combo box?
I have a form (frmLeanAssignment) with a combo box (AssignedTo). This combo box is set up so the user can select mulitple names from a list in the drop down box by checking a box next to the name (what I mean by this is there is a lookup reference for this field in the table with the "allow multiple values" property set to yes). When I have selected all the necessary names and I click "OK" I want the focus to go to a text box (CompletionNeededByTextBox).
I have the following code on the AfterUpdate event of the combo box:
Private Sub AssignedTo_AfterUpdate()
Me.CompletionNeededByTextBox.SetFocus
End Sub
When I select my names and click "OK", I get an error that says:
"Run-time error '2110': Microsoft Office Access can't move the focus to the control CompletionNeededByTextBox"
If I click Debug from this message, it opens Visual Basic and highlights the one line of code I have above.
If I click End from this message, it goes back to the form and I am able to manually click on CompletionNeededByTextBox and it does what I want.
There is probably something simple I am overlooking but it's got me tearing my hair out.
Thanks in advance for your time.
Oops...I forgot. I am using Access 2007.
Can anyone tell me why I can't set focus on a text box after I update a combo box?
I have a form (frmLeanAssignment) with a combo box (AssignedTo). This combo box is set up so the user can select mulitple names from a list in the drop down box by checking a box next to the name (what I mean by this is there is a lookup reference for this field in the table with the "allow multiple values" property set to yes). When I have selected all the necessary names and I click "OK" I want the focus to go to a text box (CompletionNeededByTextBox).
I have the following code on the AfterUpdate event of the combo box:
Private Sub AssignedTo_AfterUpdate()
Me.CompletionNeededByTextBox.SetFocus
End Sub
When I select my names and click "OK", I get an error that says:
"Run-time error '2110': Microsoft Office Access can't move the focus to the control CompletionNeededByTextBox"
If I click Debug from this message, it opens Visual Basic and highlights the one line of code I have above.
If I click End from this message, it goes back to the form and I am able to manually click on CompletionNeededByTextBox and it does what I want.
There is probably something simple I am overlooking but it's got me tearing my hair out.

Thanks in advance for your time.
Oops...I forgot. I am using Access 2007.