I have a combo box to show employee list on the data entry form and go to a specific employee when I select it,
when I add a new employee and then go to that combo box straight away the new employee not show on the list
what is that form.name ... do I have to specify it somewhere?
note: this code generated from macro
Code: Select all
Private Sub cboEmployee_GotFocus()
On Error GoTo cboEmployee_GotFocus_Err
On Error Resume Next
If (Screen.ActiveForm.Name = Form.Name) Then
DoCmd.Requery Screen.ActiveControl.Name
End If
cboEmployee_GotFocus_Exit:
Exit Sub
cboEmployee_GotFocus_Err:
MsgBox Error$
Resume cboEmployee_GotFocus_Exit
End Sub