best to build this in vba
Code:
dim filterStr as string
if not isnull(FEStart) then
filterstr="Fe BETWEEN " & FEStart & " AND " & FEEnd
end if
if not isnull(NIStart) then
if filterStr<>"" then filterStr=filterStr & " AND "
filterstr="Ni BETWEEN " & NiStart & " AND " & NiEnd
end if
if not isnull(NIStart) then
if filterStr<>"" then filterStr=filterStr & " AND "
filterstr="Cr BETWEEN " & CrStart & " AND " & CrEnd
end if
me.filter=filterstr
me.filteron=true
your db only contains tables so cannot determine the structure of your form, but if the table is in a subform then change 'me.' to 'subformcontrolname.form.' Similarly, don't know the names of your search fields so change to suit