G
Gordon
The code below works but it involves me having to type the new
"OnNotinList" entry twice - first in the combo box on the main form,
then on the data entry form that pops up when I say yes to adding a
new entry.
Private Sub fldComplaintMedium_NotInList(NewData As String, Response
As Integer)
' Add a new entry by typing a name in the box.
Dim intNewEntry As Integer, strTitle As String, intMsgDialog As
Integer
' Display message box asking if user wants to add a new Sculpture.
strTitle = "Entry Not In List"
intMsgDialog = vbYesNo + vbQuestion + vbDefaultButton1
intNewEntry = MsgBox("Do you want to add a new entry?",
intMsgDialog, strTitle)
If intNewEntry = vbYes Then
' Remove new name from ID combo box so
' control can be requeried when user returns to form.
DoCmd.RunCommand acCmdUndo
' Open AddSculpture form.
DoCmd.OpenForm "frmMedium", acNormal, , , acAdd, acDialog,
NewData
' Continue without displaying default error message.
Response = acDataErrAdded
End If
End Sub
I expected the "Newdata" string to carry the value forward and
therefore have to type it only once. Have I missed something?
Gordon
"OnNotinList" entry twice - first in the combo box on the main form,
then on the data entry form that pops up when I say yes to adding a
new entry.
Private Sub fldComplaintMedium_NotInList(NewData As String, Response
As Integer)
' Add a new entry by typing a name in the box.
Dim intNewEntry As Integer, strTitle As String, intMsgDialog As
Integer
' Display message box asking if user wants to add a new Sculpture.
strTitle = "Entry Not In List"
intMsgDialog = vbYesNo + vbQuestion + vbDefaultButton1
intNewEntry = MsgBox("Do you want to add a new entry?",
intMsgDialog, strTitle)
If intNewEntry = vbYes Then
' Remove new name from ID combo box so
' control can be requeried when user returns to form.
DoCmd.RunCommand acCmdUndo
' Open AddSculpture form.
DoCmd.OpenForm "frmMedium", acNormal, , , acAdd, acDialog,
NewData
' Continue without displaying default error message.
Response = acDataErrAdded
End If
End Sub
I expected the "Newdata" string to carry the value forward and
therefore have to type it only once. Have I missed something?
Gordon