To connect to the Access database, you need to use the OleDbConnection object. Here's an example:
Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles btnDelete.Click If String.IsNullOrWhiteSpace(txtEmployeeID.Text) Then MessageBox.Show("Please select an employee to delete.") Return End If Dim result As DialogResult = MessageBox.Show("Are you sure you want to delete this employee?", "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) If result = DialogResult.No Then Return vb.net access database example