Profesor de guardia para el primer sistema de carga de sala de ordenadores

Para otros formularios, el formulario "Maestro de turno" es relativamente simple, simplemente conecte este formulario a la tabla OnWork.

'添加表头
    With MSHFlexGrid1
        .CellAlignment = 4 '表格居中对齐
        .TextMatrix(0, 0) = "记录号"
        .TextMatrix(0, 1) = "教师"
        .TextMatrix(0, 2) = "级别"
        .TextMatrix(0, 3) = "登录日期"
        .TextMatrix(0, 4) = "登录时间"
        .TextMatrix(0, 5) = "机器名"
    End With
    
    Dim txtSQL As String
    Dim mrc As ADODB.Recordset
    Dim Msgtext As String
    
    txtSQL = "select * from OnWork_info" '连接onwork表
    Set mrc = ExecuteSQL(txtSQL, Msgtext)
    
    With MSHFlexGrid1
        .Rows = .Rows + 1
        .CellAlignment = 4 '表格居中对齐
        .TextMatrix(.Rows - 2, 1) = Trim(mrc.Fields(0))
        .TextMatrix(.Rows - 2, 2) = Trim(mrc.Fields(1))
        .TextMatrix(.Rows - 2, 3) = Trim(mrc.Fields(2))
        .TextMatrix(.Rows - 2, 4) = Trim(mrc.Fields(3))
        .TextMatrix(.Rows - 2, 5) = Trim(mrc.Fields(4))
    End With
    mrc.Close

 

Supongo que te gusta

Origin blog.csdn.net/weixin_45309155/article/details/106295582
Recomendado
Clasificación