Thread: Report Criteria
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ACase ACase is offline
external usenet poster
 
Posts: 5
Default Report Criteria

Hello

I am running reports, and enabling the user to set the criteria via a form.

The criteria works well, except when I tried adding a date range (See
Below). Not quite sure what the syntax is.

Any help would be much appreciated.

Thanks
AC
' THIS DOES NOT WORK '
If Not IsNull(Me.StartDt) And Not IsNull(Me.EndDt) Then
strWhere = strWhere & "([ProposalDate] Between """ & Me.StartDt And
Me.EndDt & """) AND "
End If

' THIS WORKS '
If Not IsNull(Me.cmb_RequestType) Then
strWhere = strWhere & "([RequestType] = """ & Me.cmb_RequestType & """)
AND "
End If