I have a report that is based on the selection of 3 combo boxes. The SQL is a mess, but it works. Being that the data set is small, having this looooong SQL statement isnt that much of an issue. I need to further filter the results by date. I have two combo boxs (cboStartDate and cboEndDate) that when clicked, gets the date value from the active x calendar control. When I try to add the "between yada yada and bla bla" I get an error saying the query is too complicated, bla bla bla.
So I thought - what if I leave the query as is and just use the WHERE portion of the docmd.openreport.
I tried creating a variable (strWhere)
but this doesnt work
Thanks, PDUNCAN
Memphis, TN - USA
When I die, I want to die like my grandfather-- who died peacefully in
his sleep. Not screaming like all the passengers in his car.
So I thought - what if I leave the query as is and just use the WHERE portion of the docmd.openreport.
I tried creating a variable (strWhere)
Code:
Dim strWhere As String
strWhere = "where " & [date] & "is Between #" & cboStartDate & "# and #" & cboEndDate & "#"
DoCmd.OpenReport "rptActivityReport", , , strWhere
but this doesnt work
Thanks, PDUNCAN
Memphis, TN - USA
When I die, I want to die like my grandfather-- who died peacefully in
his sleep. Not screaming like all the passengers in his car.