Hi Martin,
I solved my Problem when I put the complex criterias in VBA and built a SQL string like this:
So the string built up with detailstring which are blank or even not blank.
It worked then properly and easy.
Michael
I solved my Problem when I put the complex criterias in VBA and built a SQL string like this:
Code:
If not isNull(Me.MyField1) then
sql1="AND MyField1= " & Me.Myfield1
end if
If not isNull(Me.MyField2) then
sql2="AND MyField2= " & Me.Myfield2
end if
If not isNull(Me.MyField3) then
sql3="AND MyField3= " & Me.Myfield3
end if
SQL="SELECT * from mytable WHERE mymandatoryfield=.... " & sql1 & sql2 & sql3
So the string built up with detailstring which are blank or even not blank.
It worked then properly and easy.
Michael