Hello,
i'm creating a front-end for a report. This involves a complex filter.
The user wants to be able to select one or many from the departments, along with some date and type filters.
The filter is built with a simple function:
I get a 'Query to complex' when i run the report-filter. I've read there is a 64K limit. I suppose the filter exceeds this limit.
Is there a way to built the filter in a way that it does not exceed the limit?
Njit
---
It's never too late to do the Right thing
i'm creating a front-end for a report. This involves a complex filter.
![filter3cc.png](http://img55.exs.cx/img55/3006/filter3cc.png)
The user wants to be able to select one or many from the departments, along with some date and type filters.
The filter is built with a simple function:
Code:
Function addcriteria(ByVal strExistingCriteria As String, ByVal strAdditionalCriteria As String) As String
If Len(strExistingCriteria & "") = 0 Then
addcriteria = strAdditionalCriteria
Else
addcriteria = "(" & strExistingCriteria & ")" & " and " & strAdditionalCriteria
End If
End Function
If (Forms!frmreportfilter.chkBA_1 = True) Then
Afdelings_Filter = addcriteria(Afdelings_Filter, "[Afdeling] Like " + Chr(34) + "*" + "BA-1" + "*" + Chr(34))
End If
<-- the other departments are added in the same way -->
I get a 'Query to complex' when i run the report-filter. I've read there is a 64K limit. I suppose the filter exceeds this limit.
Is there a way to built the filter in a way that it does not exceed the limit?
Njit
---
It's never too late to do the Right thing