Dim tm1 As Date
tm1 = FormatDateTime(Text1.Text, vbLongTime)
Set db2 = New Connection
db2.CursorLocation = adUseClient
db2.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & App.Path & "\hbdata.mdb;"
Set adoPrimaryRS2 = New Recordset
adoPrimaryRS2.Open "select 日期 from biao", db2, adOpenStatic, adLockReadOnly
adoPrimaryRS2.Find ("时间 >= " & tm1 & " ")
mybookmark = adoPrimaryRS2.Bookmark
If Err And mycount = -1 Then
(这以上三句什么意思,尤其是bookmark怎么回事)
Form9.Label1.Caption = "读取数据库错误!!"
Form9.Show
Exit Sub
End If
Do
If adoPrimaryRS2.Fields.Item(2).Value > maxy Then
(adoPrimaryRS2.Fields.Item(2).Value 什么意思)
maxy = adoPrimaryRS2.Fields.Item(2).Value
End If
adoPrimaryRS2.MoveNext
Loop Until adoPrimaryRS2.EOF = True
K = 540 / maxy
For z = 0 To 8 Step 1
Label5(z) = maxy / 9 * (z + 1)
Next z