Access 2003 Form.RecordSet problem

  • Thread starter Alessandro Kiramarios
  • 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.
 
T

TC

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
 
A

Alessandro Kiramarios

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.
 

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