Hallo guys
i'm producing reports from a table and i get a syntax error. the code is below. any ideas what cud be wrong?
VB Code:
Private Sub Command1_Click() Dim rs As New ADODB.Recordset Opencon rsrequests.Close rsrequests.Open "SELECT * FROM Requests WHERE((DateReq) Between # " & DTPicker1.Value & "# AND #" & DTPicker2.Value & "#)ORDER BY Sort DESC", Cn, adOpenStatic, adLockReadOnly Set DataReport1.DataSource = rsrequests DataReport1.Show Set rsrequests = Nothing




Reply With Quote