We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Dim strsql As String Dim i As Integer Dim Msg As String Dim s As String 'Exit this sub if the combo box is cleared If NewData = "" Then Exit Sub Msg = "'" & NewData & "' is not currently in the list." & vbCr & vbCr Msg = Msg & "Do you want to add it?" i = MsgBox(Msg, vbQuestion + vbYesNo, "Unknown Item...") strsql = fProperCase(NewData, 1) If i = vbYes Then s = fProperCase(NewData, 1) strsql = "INSERT INTO tblCompany(CompanyName) " _ & " SELECT '" & s & "';" CurrentDb.Execute strsql, dbFailOnError Response = acDataErrAdded Else Response = acDataErrContinue Me.Undo End If
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.