Private Sub Command1_Click()
Dim mRst As New ADODB.Recordset
mRst.CursorLocation = adUseClient
mRst.Open "Select * From 表111 Where 收费日期 Between '" & DTPicker1.Value & "' And '" & DTPicker2.Value & "'", mConnString, adOpenStatic, adLockOptimistic, adCmdText
MsgBox mRst.Fields(0)
End Sub
Private Sub Form_Load()
mConnString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=test;Data Source=server"
End Sub