frmEchoEnter has a subform which does not get activated unless the user selects an Echo Number. cboEchoSelect displays a list of Echo Number available to select.
To add to the avaialbe Echo Number I have this
Not In List - Private Sub cboEchoSelect_NotInList(NewData As String, Response As Integer)
-
MsgBox "Double-click this field to add a New ECHO number to the list."
-
Response = acDataErrContinue
-
End Sub
On Double Click - Private Sub cboEchoSelect_DblClick(Cancel As Integer)
-
On Error GoTo Err_cboEchoSelect_DblClick
-
-
If IsNull(Me![cboEchoSelect]) Then
-
Me![cboEchoSelect].Text = ""
-
Else
-
Me![cboEchoSelect] = Null
-
End If
-
DoCmd.OpenForm "frmECHO", , , , , acDialog, "GotoNew"
-
Me![cboEchoSelect].Requery
-
-
-
Exit_cboEchoSelect_DblClick:
-
Exit Sub
-
-
Err_cboEchoSelect_DblClick:
-
MsgBox Err.Description
-
Resume Exit_cboEchoSelect_DblClick
-
End Sub
After Update
- Private Sub cboEchoSelect_AfterUpdate()
-
-
Me.Filter = "[ECHOID]=" & Me![cboEchoSelect]
-
Me.FilterOn = True
-
EnableControls Me, acDetail, True
-
sfrmAP.Enabled = True
-
sfrmPayroll.Enabled = True
-
-
-
End Sub
Everything is working except that after I add a new Echo Number, I must exit frmEchoEnter for the new number to be available on the list. What codes do I need to solve this problem?
- I want to double click the combo box,
- add the new number to frmEcho,
- close fromEcho and
- keep adding data to frmEchoEnter.
Thanks.