MichaelDJ2000
asked on
How to filter a CurrentDb.OpenRecordset?
The filter that I am using, see below, has no affect. That is, the result is the same with or without the filter statements. In the example, below, I'm trying to gather all records whose CustIDs are 707. (in the final code, 707 would be a variable, but I'm now using a constant for testing)
With CurrentDb.OpenRecordset("T abletbl1", dbOpenDynaset)
.Filter = "[CustIds]= 707"
rsFiltered = OpenRecordset
.
.
.
End With
Again, works fine. But, is ignoring the filter. What am I doing wrong?
MichaelDJ
With CurrentDb.OpenRecordset("T
.Filter = "[CustIds]= 707"
rsFiltered = OpenRecordset
.
.
.
End With
Again, works fine. But, is ignoring the filter. What am I doing wrong?
MichaelDJ
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
egtebas
Thanks. Worked great!
As you can see, i'm learning as i go (sink or swim)
Looking forward to your results on the previous question.
Also, is there a good Visual Basic Access reference book that you can recommend? I'm looking for a book that has a listing and description of the commands/statements. Have not had any luck finding such a book. (Based on my questions, you might have an idea of a book that might help)
MichaelDJ
Thanks. Worked great!
As you can see, i'm learning as i go (sink or swim)
Looking forward to your results on the previous question.
Also, is there a good Visual Basic Access reference book that you can recommend? I'm looking for a book that has a listing and description of the commands/statements. Have not had any luck finding such a book. (Based on my questions, you might have an idea of a book that might help)
MichaelDJ
Mastering Access (CD by examples) is what I have used in early 1990s. I don't know very many books on this subject. Generally, QUE has good books on all subjects. I whish we hade EE way back in 90s when I started learning Access.
Thank you for the grade.
Mike
Thank you for the grade.
Mike
Set rs= CurrentDb.OpenRecordset("S
Btw, tomorrow I will be able to take a look at you other question you sent.
mike