Hello,
I have a problem with the filter on a recordset. I already found on the SQL-sites that there ale problems with AND and OR combination
In my case I have a table like
Field1 = Char
Field2 = Num
Field3 = Num
Field4 = Num
Field5 = Num
I want a filter like
oRs.Filter:=Field1 = 'CL' AND ((Field2 = 2 AND Field3 = 3) OR (Field4 = 2 AND Field5 =3))
But that give an error.
So I changed it like
oRs.Filter:=(Field1 = 'CL' AND Field2 = 2 AND Field3 = 3) OR (Field1 = 'CL' AND Field4 = 2 AND Field5 =3)
That give no error, but the result is not correct. The second part (Field1 = 'CL' AND Field4 = 2 AND Field5 =3) give no result
It seems that have to a do a requery with other WHERE conditions.
Is there a way to wake the filter works, because on bij browse, I have some buttons that the user can press to have other filters?