Public Sub addrecord()
Dim cnn As Connection
Dim rs As Recordset
Dim jintian As String
Dim bijiao As Boolean
jintian = CStr(Format(Date, "Long Date"))
bijiao = False
Set cnn = New Connection
cnn.CursorLocation = adUseClient
cnn.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & App.Path & "\hbdata.mdb;"
Set rs = New Recordset
rs.Open "select 日期 from biao", cnn, adOpenStatic, adLockReadOnly
rs.MoveFirst
Do
If rs.Fields.Item(0).Value = Date Then
bijiao = True
End If
rs.MoveNext
Loop Until rs.EOF = True
rs.Close
If bijiao = False Then
tianbiao(tianbiao是一个子程序)
End If
从 rs.MoveFirst到最后,这段程序每句话什么意思,它又是实现什么功能,用的什么方法呢?