Access 2003 Form.RecordSet problem

  • Thread starter Thread starter Alessandro Kiramarios
  • Start date Start date
A

Alessandro Kiramarios

I have a problem with Acc2003 which I did not have with Acc2000.



In Acc2000 you could filter form and the resultant recordset would have been
stored.



For example, if I had a form with all my suppliers from around the word and
have a button on it that had the following code: debug.print
me.form.recordset.recordcount, the result after clicking the button in the
immediate window would be: 536.

If I filtered the records (right click, "filter by selection") to only the
US suppliers and then click the button, in the immediate window the result
would be 356.



If I do the same with Acc2003, the result is always 536.



What is important to me is not the recordcount, is the resultant recordset
after the filtering and sorting.
 
I'm surprised. Me.RecordSetClone is always a clone of the current
recordset, including the current filter if any. Are you sure that you
didn't say Me.RecordSet.Clone?

HTH,
TC
 
Yap, pretty sure :-) It gives me the same result no matter what the filter
is. And the result is the recordcount of the whole recordset without any
filter.



I found out that Access 2003 has two behaviors. It works as it is supposed
if the data is also in Access; then the RecordCount returns the filtered
count.

If a project using SQL server 2000 is used (as it is in my case) then the
RecordCount returns the full number of records (regsrdless of the filter
applied).



I have Access 2003 with all the SP's and hotfixes available from Microsoft
applied.
 
Back
Top