Dim chkDel As CheckBox
Dim hpl1 As HyperLink
Dim lab1, lab2 As Label
Dim strDate As Date
Dim i As Integer
For i = 0 To myRepeater.Items.Count - 1
chkDel = myRepeater.Items(i).FindControl("chk") 'สมมติผมเลือก row แรก มันก็มองเป็น false ซะงั้นอ่ะครับ
hpl1 = myRepeater.Items(i).FindControl("hpl1")
lab1 = myRepeater.Items(i).FindControl("label4")
lab2 = myRepeater.Items(i).FindControl("label5")
If chkDel.Checked = True Then
strDate = Convert.ToDateTime(lab1.Text).ToShortDateString
strSQL = "DELETE FROM Reserv_room WHERE RoomID = '" & hpl1.Text & "' AND Date_reserv = #" & strDate & "# AND Timestart = '" & lab2.Text & "' "
objCmd = New OleDbCommand(strSQL, objConn)
objCmd.ExecuteNonQuery()
End If