请教个日期查询!高手指点
做了个日期查询 下个是我写的代码
Private Sub Command4_Click()
Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset
rs.CursorLocation = adUseClient
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\李巧\记事本\记录本.mdb;Persist Security Info=False"
cn.Open ConnectionString
rs.Open "Select * From 退费记录表 Where 日期>=#" & Format(日期变量, "yyyy-mm-dd") & "#", cn, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = rs
DataGridRows = rs.RecordCount
End Sub
说日期的语法错误,到底什么错误? 希望大家指点下!谢谢