Code thay thế dữ liệu
maixuanthu > 07-06-13, 04:59 PM
Em có 1 table như sau:HOC(MAHV,MALOP,DIEMTHI). Em muốn tạo 1 form chyển lớp cho học viên.
Em tạo 1 cái form trong đó có 3 ô textbox, 1 ô dung để nhập mã lớp, 1 ô dùng để nhập mã học viên, 1 ô dùng để nhập vào mã lớp mà họ sinh muốn chuyển sang, đồng thời có thêm 1 nút CHUYỂN. Khi nhấn nút CHUYỂN thì dữ liệu trong trường MALOP của table HOC sẽ bị đổi thành MALOP_C mà ta đã nhập trong ô textbox thứ 3 ở trên và đồng thời xóa điểm thi đi.
VD: Ta có:
(hv001 malop1 7.5)
Ta muốn chuyển cho học viên này sang lớp có mã MALOP2 thì sau khi nhấn nút CHUYỂN thì dữ liệu tròn table sẽ như thế này.
-> (hv001 malop2 0.0)
Mong được các pro giúp đỡ.