Hello Guys
i want to add the text that in not in the combobox list
here is my code
i type the word and it's not in the list but nothing happened
i'm using access 2013
any help?
i want to add the text that in not in the combobox list
here is my code
Code:
Private Sub video_series_NotInList(NewData As String, Response As Integer)
On Error GoTo video_series_NotInList_Err
Dim intAnswer As Integer
Dim strSQL As String
intAnswer = MsgBox("The Serie " & Chr(34) & NewData & _
Chr(34) & " is not currently listed." & vbCrLf & _
"Would you like to add it to the list now?", vbQuestion + vbYesNo, "RyBaKoV Database - Add Serie to the list")
If intAnswer = vbYes Then
strSQL = "INSERT INTO tbl_videos_series(video_series) " & _
"VALUES ('" & NewData & "');"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
MsgBox "The new Serie has been added to the list." _
, vbInformation, "RyBaKoV Database - Add Serie to the list"
Response = acDataErrAdded
Else
MsgBox "Please choose a Serie from the list." _
, vbInformation, "RyBaKoV Database - Add Serie to the list"
Response = acDataErrContinue
End If
video_series_NotInList_Exit:
Exit Sub
video_series_NotInList_Err:
MsgBox Err.Description, vbCritical, "Error"
Resume video_series_NotInList_Exit
End Sub
i type the word and it's not in the list but nothing happened
i'm using access 2013
any help?