K
Ken D.
I am trying to filter a report based on selections from 3 combobox selections
on a form (FundVolFilter, FundVolGroup and FundVolSort). If the FundVolSort
choice is *All, my report opens fine but if an individual is chosed from the
FundVolSort list, I am not able to apply both the strWhere and strCMO filters.
Here is the code that opens the report:
Dim strWhere As String
Dim strReportName As String
Dim strCMO As String
strCMO = "Year([FundedDate]) = Year(Now()) And Month([FundedDate]) =
Month(Now())"
If (.FundVolFilter = "Current Month" And .FundVolGroup = "LO") Then
If (Me.FundVolSort) = "*All" Then
strReportName = "Fundings by LO"
DoCmd.OpenReport strReportName, _
acPreview, "", strCMO
Else
strWhere = "[LO] = """ & Me.FundVolSort & """"
strReportName = "Fundings by LO"
DoCmd.OpenReport strReportName, _
acPreview, "", strWhere
DoCmd.ApplyFilter strCMO
End If
End If
Any help would be appreciated...
on a form (FundVolFilter, FundVolGroup and FundVolSort). If the FundVolSort
choice is *All, my report opens fine but if an individual is chosed from the
FundVolSort list, I am not able to apply both the strWhere and strCMO filters.
Here is the code that opens the report:
Dim strWhere As String
Dim strReportName As String
Dim strCMO As String
strCMO = "Year([FundedDate]) = Year(Now()) And Month([FundedDate]) =
Month(Now())"
If (.FundVolFilter = "Current Month" And .FundVolGroup = "LO") Then
If (Me.FundVolSort) = "*All" Then
strReportName = "Fundings by LO"
DoCmd.OpenReport strReportName, _
acPreview, "", strCMO
Else
strWhere = "[LO] = """ & Me.FundVolSort & """"
strReportName = "Fundings by LO"
DoCmd.OpenReport strReportName, _
acPreview, "", strWhere
DoCmd.ApplyFilter strCMO
End If
End If
Any help would be appreciated...