access thread: ... problems with ServerFilter property
Hi to all,
Here is my problem: I program a lot using VBA from Access 2000. However
when I changed to access projects I found a situation I have not been able
to solve.
I use DoCmd.OpenForm to open a form from another form. To select only the
records tha the user wants to see, I use the WhereCondition property of
the OpenForm. The problem occurs when the user sorts the selected records
using the bottons that Access 2000 has in the tool bar. Then, the criteria
that was specified as WhereCondition is written to the form's ServerFilter
and the criteria in the next DoCmd.OpenForm's WhereCondition is IGNORED.
That is: when there is some criteria in the ServerFilter property of the
form, the criteria you specified in the OpenForm's WhereCondition is not
used by access 2000 and the form opens using the ServerFilter instead.
Of course I know that is normal for Access 2000 to save the criteria in
the ServerFilter property. Wich is incorrect is that the ServerFilter is
applied when the form is open and, even more, instead of the
WhereCondition of the DoCmd.OpenForm.
This problem does not occurs when you use Jet (ie: mdb databases) instead
of Sql Server (project databases).
Some help is very welcomed.
Bye, Manuel Rivera.