Text1.Text = Date - 7 , Text2.Text = Date
strsql = "select * from fptable where riqi between '" & CDate(Text2.Text) & "' And '" & CDate(Text3.Text) & "'"
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=dt"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open strsql1, db, adOpenStatic, adLockOptimistic
Set DataGrid1.DataSource = adoPrimaryRS