Connecting Tech Pros Worldwide Forums | Help | Site Map

Filter

amir
Guest
 
Posts: n/a
#1: Dec 13 '06
How can I filter again my previous filtered records, I mean when I
filter an entire I can filter again and again the filtered data.
Many thanks for your help.

Amir


Ed Robichaud
Guest
 
Posts: n/a
#2: Dec 13 '06

re: Filter


You can simply use SelectQuery1 as the datasource of SelectQuery2, then use
#2 as the datasource of SelectQuery3, etc. When you run Query#n, all the
underlying queries will be run in sequence.
-Ed

"amir" <markid_82@yahoo.comwrote in message
news:1165999673.816586.244980@n67g2000cwd.googlegr oups.com...
Quote:
How can I filter again my previous filtered records, I mean when I
filter an entire I can filter again and again the filtered data.
Many thanks for your help.
>
Amir
>

amir
Guest
 
Posts: n/a
#3: Dec 14 '06

re: Filter


Dear Ed
This is my query:
I used adodc & datagrid with this code

Dim MyQuery as string

MyQuery = cbo_catagory & " " & cbo_Operator & " '" & text1.text & "' "

If Text1.Text <"" Then
Adodc1.Recordset.Filter = MyQuery
End If

So what is your suggetion on this matter. Pls help me.

Thanks for your reply.

Amir

Ed Robichaud wrote:
Quote:
You can simply use SelectQuery1 as the datasource of SelectQuery2, then use
#2 as the datasource of SelectQuery3, etc. When you run Query#n, all the
underlying queries will be run in sequence.
-Ed
>
"amir" <markid_82@yahoo.comwrote in message
news:1165999673.816586.244980@n67g2000cwd.googlegr oups.com...
Quote:
How can I filter again my previous filtered records, I mean when I
filter an entire I can filter again and again the filtered data.
Many thanks for your help.

Amir
Ed Robichaud
Guest
 
Posts: n/a
#4: Dec 14 '06

re: Filter


You're not actually creating a filter with your string. What value(s) of
[category], [operator] or [text] do you want to filter on? Try creating
your filter with a select query in design mode (and set your criteria for
those fields); save that query; reference that query in your code:

If Text1.Text <"" Then
Adodc1.Recordset = qryMyQuery
Adodc1.requery
End If

Assuming that "adodc1" is the name of your form/report.

-Ed


"amir" <markid_82@yahoo.comwrote in message
news:1166081626.242315.163760@16g2000cwy.googlegro ups.com...
Quote:
Dear Ed
This is my query:
I used adodc & datagrid with this code
>
Dim MyQuery as string
>
MyQuery = cbo_catagory & " " & cbo_Operator & " '" & text1.text & "' "
>
If Text1.Text <"" Then
Adodc1.Recordset.Filter = MyQuery
End If
>
So what is your suggetion on this matter. Pls help me.
>
Thanks for your reply.
>
Amir
>
Ed Robichaud wrote:
Quote:
>You can simply use SelectQuery1 as the datasource of SelectQuery2, then
>use
>#2 as the datasource of SelectQuery3, etc. When you run Query#n, all the
>underlying queries will be run in sequence.
>-Ed
>>
>"amir" <markid_82@yahoo.comwrote in message
>news:1165999673.816586.244980@n67g2000cwd.googleg roups.com...
Quote:
How can I filter again my previous filtered records, I mean when I
filter an entire I can filter again and again the filtered data.
Many thanks for your help.
>
Amir
>
>

Closed Thread