With MSFlexGrid1 .FixedRows = 0 .RemoveItem 1 .ColWidth(0) = 1200: .ColWidth(1) = 3000: .ColWidth(2) = 1200: .ColWidth(6) = 1500 strCN = Array("借阅证号", "书名", "图书条码", "借期", "还期", "已还", "库名") For i = 0 To 6 .TextMatrix(0, i) = strCN(i) Next End With With Library_Manage.rsLendReturn If .State = adStateClosed Then .Open Set Rs = .Clone End With With Rs If Not .EOF Then .MoveFirst For i = 0 To .RecordCount - 1 If IsDate(.Fields("还期")) Then ''''MsgBox .Fields("证号") If CDate(.Fields("还期")) < Date Then strSQL = "select 书名 from 馆藏书目 where 条码=''''" & .Fields("条码") & "'''' And 库室名=''''" & .Fields("库名") & "''''" With Library_Manage.Library_Manage_Con If .State = adStateClosed Then .Open Set objInfo = .Execute(strSQL) End With strT = .Fields("证号") & vbTab & objInfo.Fields("书名") & vbTab & .Fields("条码") & vbTab & .Fields("借期") & vbTab & .Fields("还期") _ & vbTab & .Fields("已还") & vbTab & .Fields("库名")
MSFlexGrid1.AddItem strT End If End If .MoveNext Next If MSFlexGrid1.Rows > 1 Then _ MSFlexGrid1.FixedRows = 1 End If End With