G
Guest
It seems like I have SQL code problem.
I use vba code to make a query. strSelect is string
strSelect = "Select [RecordDate] " & _
"From [Record] " & _
"Where [Company] = '" & Me.SelectCompany.Value & "' And " & _
" [RecordDate] < #" & Me.EndDate.Value & "# And
[RecordDate] > #" & Me.StartDate.Value & "#" & _
"Order by [RecordDate] DESC"
I need it keeps the record data which between the date, but I think the
StartDate and EndDate code is wrong. How should I write it?
Thank you.
Fox
I use vba code to make a query. strSelect is string
strSelect = "Select [RecordDate] " & _
"From [Record] " & _
"Where [Company] = '" & Me.SelectCompany.Value & "' And " & _
" [RecordDate] < #" & Me.EndDate.Value & "# And
[RecordDate] > #" & Me.StartDate.Value & "#" & _
"Order by [RecordDate] DESC"
I need it keeps the record data which between the date, but I think the
StartDate and EndDate code is wrong. How should I write it?
Thank you.
Fox