txtsql = "select * from student_info where Ischeck='未结账' and type = '固定用户' and UserID = '" & Trim(combousername.Text) & "'"
Set mrs = ExecuteSQL(txtsql, msgtext)
With msfgrid1
.Rows = 1
.CellAlignment = 4
.TextMatrix(0, 0) = "学号"
.TextMatrix(0, 1) = "卡号"
.TextMatrix(0, 2) = "日期"
.TextMatrix(0, 3) = "时间"
Do While Not mrs.EOF
.Rows = .Rows + 1
.CellAlignment = 4
.TextMatrix(.Rows - 1, 0) = Trim(mrs.Fields(1))
.TextMatrix(.Rows - 1, 1) = Trim(mrs.Fields(0))
.TextMatrix(.Rows - 1, 2) = Trim(mrs.Fields(12))
.TextMatrix(.Rows - 1, 3) = Trim(mrs.Fields(13))
'移动到下一条记录
mrs.MoveNext
Loop
End With
查询退卡结果
txtsql = "select * from cancelcard_info where status='未结账' and UserID = '" & Trim(combousername.Text) & "'"
Set mrcc = ExecuteSQL(txtsql, msgtext)
查询充值结果
txtsql = "select * from recharge_info where status='未结账' and UserID = '" & Trim(combousername.Text) & "'"
Set mrss = ExecuteSQL(txtsql, msgtext)
查询临时用户消费
txtsql = "select * from student_info where Ischeck='未结账' and type = '临时用户' and UserID = '" & Trim(combousername.Text) & "'"
Set mrccc = ExecuteSQL(txtsql, msgtext)