G
Guest
I have the following set up:
CustomerNameCombo that requeries ContactNameCombo after update.
ContactNameCombo with following Row Source:
SELECT tContactList.ContactID, tContactList.ContactName,
tContactList.CustomerID FROM tContactList WHERE
(((tContactList.CustomerID)=[forms]![fgeneralInfo]![CustomerNameCombo]));
and Not In List Event
Private Sub ContactNameCombo_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_ContactNameCombo_NotInList
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "fContactList"
DoCmd.OpenForm stDocName, , , , acFormAdd, acDialog, NewData
Response = acDataErrAdded
Exit_ContactNameCombo_NotInList:
Exit Sub
Err_ContactNameCombo_NotInList:
MsgBox Err.Description
Resume Exit_ContactNameCombo_NotInList
End Sub
Form to allow user to enter name of new contact:
Private Sub Form_Load()
If Len(Me.OpenArgs) > 0 Then
Me.ContactName = Me.OpenArgs
End If
End Sub
Everything was working fine - new entry form would open, allow new info to
be inserted, and when closed return to fgeninfo form with new contact info
already displayed. I decided to cascade the customer and contact combo boxes
to only have contact for specific customer display. Now, when I try to enter
a new contact, the form opens, I enter new entry, close it, go back to first
form and message is displayed "Text not in list".
Can someone please tell me what I'm missing?
Thanks in advance for any help.
Pam
CustomerNameCombo that requeries ContactNameCombo after update.
ContactNameCombo with following Row Source:
SELECT tContactList.ContactID, tContactList.ContactName,
tContactList.CustomerID FROM tContactList WHERE
(((tContactList.CustomerID)=[forms]![fgeneralInfo]![CustomerNameCombo]));
and Not In List Event
Private Sub ContactNameCombo_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_ContactNameCombo_NotInList
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "fContactList"
DoCmd.OpenForm stDocName, , , , acFormAdd, acDialog, NewData
Response = acDataErrAdded
Exit_ContactNameCombo_NotInList:
Exit Sub
Err_ContactNameCombo_NotInList:
MsgBox Err.Description
Resume Exit_ContactNameCombo_NotInList
End Sub
Form to allow user to enter name of new contact:
Private Sub Form_Load()
If Len(Me.OpenArgs) > 0 Then
Me.ContactName = Me.OpenArgs
End If
End Sub
Everything was working fine - new entry form would open, allow new info to
be inserted, and when closed return to fgeninfo form with new contact info
already displayed. I decided to cascade the customer and contact combo boxes
to only have contact for specific customer display. Now, when I try to enter
a new contact, the form opens, I enter new entry, close it, go back to first
form and message is displayed "Text not in list".
Can someone please tell me what I'm missing?
Thanks in advance for any help.
Pam