P
Paul
I wonder if anyone else has experienced these filter problems I
have...
I have an Access 2002 adp connected to a sql 2000 server back-end and
a form that can be filtered using a similar 'filter form'. This builds
a filter string depending on the criteria entered in the fields (using
the BuildCriteria function) that is applied to the main form .filter
property.
(I have never been able to work out how to apply a filter with the
..serverfilter property in code. Setting a filter and using .requery
just seems to have no effect!?? Perhaps I'm missing something)
However, my main problem is with passing the applied form filter to a
report. I use the following code in the report's Open event:
Me.Filter = Forms![form].Filter
Me.FilterOn = True
I have had instances when the report filters correctly, but the
majority of the time, and when using filter criteria that includes the
'%' wildcard or multiple fields, the report filter shows an incomplete
set of records - or no records at all. The point being, the form and
report filter results are not the same!
I've been through so many ideas of trying to solve this (converting
the form filter to a query, server filters, even building a temporary
table with the filtered recordset and using this as the recordsource
of the report) and none seem to be happening for me.
I hope I'm not the only one who has experienced these filter problems
with an adp. Perhaps I'm being too ambitious with the 'filter by any
field you like' form and trying to provide the user with as much
flexibility as possible. Have I hit a limitation of Access, because it
feels like I'm fighting with bugs in the software?!
Of course - any help or comments are very much appreciated.
Thanks,
Paul
have...
I have an Access 2002 adp connected to a sql 2000 server back-end and
a form that can be filtered using a similar 'filter form'. This builds
a filter string depending on the criteria entered in the fields (using
the BuildCriteria function) that is applied to the main form .filter
property.
(I have never been able to work out how to apply a filter with the
..serverfilter property in code. Setting a filter and using .requery
just seems to have no effect!?? Perhaps I'm missing something)
However, my main problem is with passing the applied form filter to a
report. I use the following code in the report's Open event:
Me.Filter = Forms![form].Filter
Me.FilterOn = True
I have had instances when the report filters correctly, but the
majority of the time, and when using filter criteria that includes the
'%' wildcard or multiple fields, the report filter shows an incomplete
set of records - or no records at all. The point being, the form and
report filter results are not the same!
I've been through so many ideas of trying to solve this (converting
the form filter to a query, server filters, even building a temporary
table with the filtered recordset and using this as the recordsource
of the report) and none seem to be happening for me.
I hope I'm not the only one who has experienced these filter problems
with an adp. Perhaps I'm being too ambitious with the 'filter by any
field you like' form and trying to provide the user with as much
flexibility as possible. Have I hit a limitation of Access, because it
feels like I'm fighting with bugs in the software?!
Of course - any help or comments are very much appreciated.
Thanks,
Paul