R
Ray Todd Jr
Form (frmNEWPROPERTYentry)
subform (subDEFENDANTentry)
on subform there is a control (cboDEFENDANTSNAME) whose recordsource is
DefendantNamesID and is bound to taDEFENDANTSNAME.
cboDEFENDANTSNAME combines the defendants name in this format:
Last, First Middle Suffix
If I enter a name into the control, such as "Test, Linda" and that name
isn't in the taDEFENDANTSNAME table, I have it set to open the dataentry form
via the following code:
Private Sub cboDefendantName_NotInList(NewData As String, Response As Integer)
If MsgBox("subDEFENDANTentry: Would you like to add a new Defendant?",
vbYesNo) = vbYes Then
DoCmd.OpenForm "frmNEWDEFENDANT", , , , acFormAdd, acDialog
Response = acDataErrAdded
Else
Response = acDataErrContinue
Me.Undo
End If
End Sub
On the newly opened form, I enter the required names, address, etc. I then
click on the save data button and close the form.
"I then get the error The Text You entered isn't an item in the list"
I have watched the execution of the code and via the locals windows and the
data is as follows:
NewData=Test,Linda
Response=1
At this point, it loops back around to asking me if I want to enter a new
defendant.
Someone, please tell me what I am doing wrong.
Thanks,
subform (subDEFENDANTentry)
on subform there is a control (cboDEFENDANTSNAME) whose recordsource is
DefendantNamesID and is bound to taDEFENDANTSNAME.
cboDEFENDANTSNAME combines the defendants name in this format:
Last, First Middle Suffix
If I enter a name into the control, such as "Test, Linda" and that name
isn't in the taDEFENDANTSNAME table, I have it set to open the dataentry form
via the following code:
Private Sub cboDefendantName_NotInList(NewData As String, Response As Integer)
If MsgBox("subDEFENDANTentry: Would you like to add a new Defendant?",
vbYesNo) = vbYes Then
DoCmd.OpenForm "frmNEWDEFENDANT", , , , acFormAdd, acDialog
Response = acDataErrAdded
Else
Response = acDataErrContinue
Me.Undo
End If
End Sub
On the newly opened form, I enter the required names, address, etc. I then
click on the save data button and close the form.
"I then get the error The Text You entered isn't an item in the list"
I have watched the execution of the code and via the locals windows and the
data is as follows:
NewData=Test,Linda
Response=1
At this point, it loops back around to asking me if I want to enter a new
defendant.
Someone, please tell me what I am doing wrong.
Thanks,