Private Sub cboInitiates_NotInList(NewData As String, Response As Integer) Dim Msg As String On Error GoTo cboInitiates_NotInList_Err blAddBank = False 'this needs to match the on load of the ad list form below in If NewData = "" Then Exit Sub Msg = "'" & NewData & "' is not on the list." & vbCr & vbCr Msg = Msg & "Do you want to add it?" If MsgBox(Msg, vbYesNo + vbQuestion, "NotListed") = vbNo Then Response = acDataErrContinue Me.cboInitiates.SelStart = 0 Me.cboInitiates.SelLength = Len(Me.cboInitiates.Text) Else DoCmd.OpenForm "frmImportantDate_Add", , , , acFormAdd, acDialog, OpenArgs:=NewData If blAddBank Then Response = acDataErrAdded Me.cboInitiates.RowSource = Me.cboInitiates.RowSource Else Response = acDataErrContinue End If End If cboInitiates_NotInList_Exit: Exit Sub cboInitiates_NotInList_Err: MsgBox Err.Description Response = acDataErrContinue Resume cboInitiates_NotInList_Exit End Sub
|Getting the Error "User-defined type not defined" in MS Access 2013||16||45|
|How can I solve "The expression you entered has a function that database01 can't find"||25||37|
|Form suddenly popping up error "There was an error referencing a property of the object"||3||21|
|MS Access 2010 : hyperlink to picture in report doesn't show picture||2||14|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!