Problems with RecordsetClone.RecordCount in Access 2007
Posted on 2009-07-07
I have created a form to search the database that has several unbound fields in the form header that allow a user to enter criteria that gets dynamically filtered as they are typing. And it works perfectly.....in Access 2003. I have users that will be using both Access 2003 and 2007 so I figured that I would take it for a test run in 2007 and it works....for one letter. I went thru and debugged the code to figure out why I was always getting "No Records Returned" after I entered a second letter....
For some reason this code works in 2003, but not 2007:
If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "No records returned"
I can't just get rid of the code because of other access bugs dealing with unbound textboxes in the form header (I can show you the threads on EE if you like). So what I need is a way to test the number of records in my form after a filter is applied to it that works everytime and not just the first time I run thru the code.
I have looked around and seen lots of problems with the RecordCount in 07, but they all seemed to happen when trying to use the information in a textbox.
Access 07 is on a different computer with Vista where the other computer is Access 03 and XP. I also installed all the updates from Windows Update two days ago so Access 07 is up to date.
Oh the joys of Microsoft....
Thanks for any help in advance