I'm in the process of moving over to SQL fom Access. I've created a sql db and now created a access data project i used to have a not in list procedure in my access 2000 db but it does not seem to work now i moved. Can any one give me any assitane please. the code is:
Dim db As Database
If (MsgBox("Do you want to add """ & NewData & """ to the list of subjects?", 36, "New Subject") = 6) Then
Set db = DBEngine.Workspaces(0).Databases(0)
db.Execute "INSERT INTO Subjects (Subject) VALUES (""" & NewData & """);"
Response = DATA_ERRADDED
Else
Response = DATA_ERRDISPLAY
End If
Dim db As Database
If (MsgBox("Do you want to add """ & NewData & """ to the list of subjects?", 36, "New Subject") = 6) Then
Set db = DBEngine.Workspaces(0).Databases(0)
db.Execute "INSERT INTO Subjects (Subject) VALUES (""" & NewData & """);"
Response = DATA_ERRADDED
Else
Response = DATA_ERRDISPLAY
End If