1。你可以添加一个lable 然后 If rs.RecordCount > 0 Then lblTotal.Caption = "共有 " & rs.RecordCount & " 人" Else lblTotal.Caption = "" End If
用一label控件顯示Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer) if rs.recordcount>0 then label1.caption="共用" & rs.recordcount & "筆紀錄" if rs.bof or rs.eof then label1.caption=label1,caption & "目前為第" rs.AbsolutePosition & "筆記錄" end if End Sub
sorry 少一end if 用一label控件顯示Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer) if rs.recordcount>0 then label1.caption="共用" & rs.recordcount & "筆紀錄" if rs.bof or rs.eof then label1.caption=label1,caption & "目前為第" rs.AbsolutePosition & "筆記錄" endif end if End Sub
If rs.RecordCount > 0 Then
lblTotal.Caption = "共有 " & rs.RecordCount & " 人"
Else
lblTotal.Caption = ""
End If
if rs.recordcount>0 then
label1.caption="共用" & rs.recordcount & "筆紀錄"
if rs.bof or rs.eof then
label1.caption=label1,caption & "目前為第" rs.AbsolutePosition & "筆記錄"
end if
End Sub
用一label控件顯示Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
if rs.recordcount>0 then
label1.caption="共用" & rs.recordcount & "筆紀錄"
if rs.bof or rs.eof then
label1.caption=label1,caption & "目前為第" rs.AbsolutePosition & "筆記錄"
endif
end if
End Sub