IAM使用MS Access數據庫,我想用下面的代碼的兩個日期如何在日期之間搜索?
stdate= starting date
edate=end date
IAM之間獲取數據。
Private Sub Label3_Click()
DataGrid1.Visible = True
Dim stdate As Date
Dim edate As Date
Format = stdate("mm/dd/yyyy")
Format = edate("mm/dd/yyyy")
stdate = Text1.Text
edate = Text2.Text
Adodc1.RecordSource = "SELECT * FROM sales_info WHERE date BETWEEN &stdate& and &edate& "
Adodc1.Refresh
End Sub
錯誤的IAM越來越是:
syntax error expected array(in format statement)
missing operator in query expression date.
感謝
plz幫助
IAM初學者