I am trying to delete the record of a person entered in the textbox. This is the code I have and I don't know what to do next because my code is not working.
AcademicAssessmentConnection = New OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\AdvisorAssessmentTool.accdb")
AcademicAssessmentConnection.Open()
AcademicAssessmentCommand = New OleDbCommand()
AcademicAssessmentCommand.Connection = AcademicAssessmentConnection
AcademicAssessmentCommand.CommandText = "DELETE (*) from Students where StudentID = @lookup"
AcademicAssessmentCommand.ExecuteNonQuery()
MsgBox("Successfully Deleted")
AcademicAssessmentConnection.Close()
You need to add a parameter to the Command object that contains the value for @lookup.