S
SF
Hi,
I cannot have the following code to work. I received error # 3146. Can
someone help?
Private Sub CrgID_NotInList(NewData As String, Response As Integer)
Dim strSQL As String
Dim i As Integer
Dim Msg As String
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 Organization
Category...")
If i = vbYes Then
strSQL = "INSERT INTO tblOrganization
([Org_OrganisationID],[Org_Abbreviation],[Org_ProvinceID]) " & _
"values (127,'" & NewData & "',12);"
CurrentDb.Execute strSQL, dbFailOnError
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
End Sub
I cannot have the following code to work. I received error # 3146. Can
someone help?
Private Sub CrgID_NotInList(NewData As String, Response As Integer)
Dim strSQL As String
Dim i As Integer
Dim Msg As String
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 Organization
Category...")
If i = vbYes Then
strSQL = "INSERT INTO tblOrganization
([Org_OrganisationID],[Org_Abbreviation],[Org_ProvinceID]) " & _
"values (127,'" & NewData & "',12);"
CurrentDb.Execute strSQL, dbFailOnError
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
End Sub