Using .FILTER
- From: "George H. Slamowitz" <GSlamowitz@xxxxxxx>
- Date: Wed, 20 Jul 2005 05:58:04 -0700
I have a JET table that I'm trying to access through Visual Basic 6 using ADO.
I'm trying to filter the table looking for only certain Product Lines
1. I run the following code and it filters the correct records for me
Q = "(Key = 1)"
Rsts(6).Filter = IIf(Q = "", adFilterNone, Q)
2. When I run the following code it only filters the same as above as if
was
(Key = 2)
Q = "((Key = 1) or (Key = 2))"
Rsts(6).Filter = IIf(Q = "", adFilterNone, Q)
*** Does anyone have any idea what I'm doing wrong ????
3. I then tried the following code and I got a 3001 error message ... The
IN
statement worked in MS Access SQL but I can't seem to find any
reference to
it in ADO
Q = "(Key IN (1,2))"
Rsts(6).Filter = IIf(Q = "", adFilterNone, Q)
*** Is the IN Statement supported in normal SQL (ADO) or has the
command
changed?
I must be doing somthing wrong, but I don't know what. Can anyone show me
the errors of my way?????
Thanks in advance
--
George H. Slamowitz
(602) 765-8111
(602) 765-8222 (FAX)
.
- Follow-Ups:
- Re: Using .FILTER
- From: Paul Clement
- Re: Using .FILTER
- Prev by Date: Re: Converting Access 95 DB's to 2000
- Next by Date: Re: Converting Access 95 DB's to 2000
- Previous by thread: Converting Access 95 DB's to 2000
- Next by thread: Re: Using .FILTER
- Index(es):
Relevant Pages
|