- Ch ươ ng trình có th : ể. - Ch ươ ng trình có th ể. - C u trúc ch ấ ươ ng trình. - C S D LI U C A CH Ơ Ở Ữ Ệ Ủ ƯƠ NG TRÌNH 1. - B d li u g c c a ch ộ ữ ệ ố ủ ươ ng trình 1. - Đóng gói ch ươ ng trình. - Private Sub Sub_Name(). - Dim them As Boolean Private Sub form_load(). - n = Ado_DMCT.Recordset.RecordCount. - Private Sub Khoa(). - Private Sub Mo_Khoa(). - Private Sub cmdthem_click() On Error GoTo Loi_Them. - Private Sub cmdsua_click() Dim recnum. - Private Sub cmdghi_click() On Error GoTo Loi_Ghi. - Private Sub cmdkhong_click() If them Then. - Ado_DMCT.Recordset.CancelUpdate End If. - Private Sub cmdthoat_click() Ado_DMCT.Refresh. - Private Sub DataDMCT_click() Dim n. - Private Sub Form_Load(). - n = Ado_DMTK.Recordset.RecordCount. - Private Sub cmdthem_click() On Error GoTo Loi_Them Ado_DMTK.Refresh. - Ado_DMTK.Recordset.CancelUpdate End If. - Private Sub cmdthoat_click() Ado_DMTK.Refresh. - Private Sub DataDMTK_click() Dim n. - Ado_DMTK.Recordset.MovePrevious End If. - Ado_DMTK.Recordset.MoveNext End If. - Ado_DMTK.Recordset.MoveFirst End If. - Ado_DMTK.Recordset.MoveLast End If. - If Ado_HDNHAP.Recordset.EOF. - Ado_HDNHAP.Recordset.MoveLast End If. - Private Sub cmdcuoi_mousemove(button As Integer, shift As Integer, x As Single, y As Single). - If Ado_HDNHAP.Recordset.BOF. - Ado_HDNHAP.Recordset.MoveFirst End If. - Private Sub cmddau_mousemove(button As Integer, shift As Integer, x As Single, y As Single). - If Ado_HDNHAP.Recordset.EOF Then. - Ado_HDNHAP.Recordset.MoveNext End If. - Private Sub cmdsau_mousemove(button As Integer, shift As Integer, x As Single, y As Single). - Ado_HDNHAP.Recordset.MovePrevious End If. - Private Sub cmdtruoc_mousemove(button As Integer, shift As Integer, x As Single, y As Single). - Private Sub cmdthem_mousemove(button As Integer, shift As Integer, x As Single, y As Single). - Private Sub cmdsua_click() On Error GoTo Loi_Sua. - Private Sub cmdsua_mousemove(button As Integer, shift As Integer, x As Single, y As Single). - Private Sub cmdxoa_mousemove(button As Integer, shift As Integer, x As Single, y As Single). - Private Sub cmdghi_mousemove(button As Integer, shift As Integer, x As Single, y As Single). - Private Sub cmdkhong_click() Ado_HDNHAP.Refresh. - Ado_HDNHAP.Recordset.CancelUpdate Khoa. - Private Sub cmdkhong_mousemove(button As Integer, shift As Integer, x As Single, y As Single). - Private Sub cmdthoat_click(). - sobg = Ado_HDNHAP.Recordset.RecordCount. - Private Sub VScrollTHANG_change() Dim thang As Byte. - Private Sub txtNAM_change(). - Private Sub VScrollNAM_change() Dim nam, so. - Private Sub DCDMCT_change(). - Private Sub DCDMCT_keypress(keyascii As Integer) Dim str As String. - Private Sub DCDMCT_lostfocus(). - Private Sub txtNGAYCT_gotfocus() txtNGAYCT.BackColor = &HC0E0FF End Sub. - Private Sub txtNGAYCT_keypress(keyascii As Integer) Select Case keyascii. - Private Sub txtNGAYCT_lostfocus() txtNGAYCT.BackColor = &HFFFFFF End Sub. - Private Sub txtSCTG_keypress(keyascii As Integer) Select Case keyascii. - Private Sub txtSCTG_lostfocus() txtSCTG.BackColor = &HFFFFFF End Sub. - n = Ado_HDNHAP.Recordset.RecordCount. - n1 = Ado_HDNHAP.Recordset.Bookmark End If. - Private Sub txtSCT_keypress(keyascii As Integer) Select Case keyascii. - Private Sub txtSCT_lostfocus() txtSCT.BackColor = &HFFFFFF End Sub. - Private Sub txtDIENGIAI_gotfocus() txtDIENGIAI.BackColor = &HC0E0FF End Sub. - Private Sub txtDIENGIAI_keypress(keyascii As Integer) Select Case keyascii. - Private Sub txtDIENGIAI_lostfocus() txtDIENGIAI.BackColor = &HFFFFFF End Sub. - Private Sub DCDMNCC_gotfocus() DCDMNCC.BackColor = &HC0E0FF End Sub. - Private Sub DCDMNCC_change() Dim db As DAO.Database. - Private Sub DCDMNCC_keypress(keyascii As Integer) Dim str As String. - Private Sub DCDMNCC_lostfocus(). - Private Sub DCDMKHO_gotfocus(). - Private Sub DCDMKHO_change() Dim db As DAO.Database. - Private Sub DCDMKHO_keypress(keyascii As Integer) Dim str As String. - Private Sub DCDMKHO_lostfocus() Me.DCDMKHO.BackColor = &HFFFFFF End Sub. - Private Sub DCDMTK_gotfocus(). - Private Sub DCDMTK_keypress(keyascii As Integer) Dim str As String. - Private Sub DCDMTK_lostfocus(). - Private Sub DCDMTKDU_gotfocus(). - Private Sub DCDMTKDU_change() Dim db As DAO.Database. - Private Sub DCDMTKDU_keypress(keyascii As Integer) Dim str As String. - Private Sub DCDMTKDU_lostfocus(). - Private Sub DCDMNT_gotfocus(). - Private Sub DCDMNT_change() Dim db As DAO.Database. - Private Sub DCDMNT_keypress(keyascii As Integer) Dim str As String. - Private Sub DCDMNT_lostfocus(). - Private Sub DCDMNV_gotfocus(). - Private Sub DCDMNV_change() Dim db As DAO.Database Dim rs As DAO.Recordset Dim chuoi As String. - Private Sub DCDMNV_keypress(keyascii As Integer) Dim str As String. - Private Sub DCDMNV_lostfocus(). - Private Sub txtTYGIA_gotfocus() txtTYGIA.BackColor = &HC0E0FF. - Private Sub txtTYGIA_keypress(keyascii As Integer) Select Case keyascii. - Private Sub txtTYGIA_lostfocus() txtTYGIA.BackColor = &HFFFFFF End Sub. - Private Sub chkTHUE_gotfocus() chkTHUE.BackColor = &HC0E0FF End Sub. - Private Sub chkTHUE_keypress(keyascii As Integer) Select Case keyascii. - Private Sub chkTHUE_lostfocus() chkTHUE.BackColor = &H8000000F End Sub. - Private Sub DCDMHTTT_gotfocus(). - Private Sub DCDMHTTT_change() Dim db As DAO.Database. - Private Sub DCDMHTTT_keypress(keyascii As Integer) Dim str As String. - Private Sub DCDMHTTT_lostfocus() Me.DCDMHTTT.BackColor = &HFFFFFF End Sub
Xem thử không khả dụng, vui lòng xem tại trang nguồn hoặc xem
Tóm tắt