ServerFilter Not Working

J

JH Szymanski

I have a subform in an .ADP project that is based on a SQL
Server view. I have a button on the form that I use to
control filtering of the records displayed in the
subform. I was getting inconsistent results using
the .Filter property, so I changed the code to
use .ServerFilter. The filtering works better; however, I
must run the code twice in order for the
specified .ServerFilter to take affect. I've tried
using .Requery, .Refresh, .Recalc, .Repaint all of which
seem to make no difference. Are there any other tricks to
force the forms recordset to be filtered properly the
first time? Any ideas would be appreciated.

Thanks, JOE...
 
Joined
Apr 6, 2006
Messages
1
Reaction score
0
Try to reset the orderby before using the serverfilter

something like this :


Dim Vorder, strFilter as string

strFilter = .....

Vorder = me.orderby
me.orderby = ""
me.orderbyon = false

me.serverfilter = strFilter
me.requery

me.orderby = Vorder
me.orderbyon = true
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top