I
Ivor Williams
I'm trying to use the following code to add a new part using a form called
frmNewPart. What I want to have happen is this:
I enter a new part number in a combo box in which the Limit to List
property is set to Yes
The NotInList event causes the frmNewPart form to open
The information for the new part is entered on the frmNewPart form
Then new part is added to the tblParts table from which the
frmNewPart form gets its data
The frmNewPart form closes and the combo box is populated with data
for the newly added part
Private Sub PartNo_NotInList(NewData As String, Response As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmNewPart"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , acDialog
Response = acDataErrAdded
End Sub
The frmNewPart form doesn't open. I'm not sure why, I think it may have to
do with stLinkCriteria. Please help.
Ivor
frmNewPart. What I want to have happen is this:
I enter a new part number in a combo box in which the Limit to List
property is set to Yes
The NotInList event causes the frmNewPart form to open
The information for the new part is entered on the frmNewPart form
Then new part is added to the tblParts table from which the
frmNewPart form gets its data
The frmNewPart form closes and the combo box is populated with data
for the newly added part
Private Sub PartNo_NotInList(NewData As String, Response As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmNewPart"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , acDialog
Response = acDataErrAdded
End Sub
The frmNewPart form doesn't open. I'm not sure why, I think it may have to
do with stLinkCriteria. Please help.
Ivor