Synchronizing Combos To filter Records

vdanelia

Registered User.
Local time
Today, 05:04
Joined
Jan 29, 2011
Messages
215
Hello Friends, I need your Help!
Yesterday i worked with my record filter form (With Your Help of Course) and did it (Combos are filtering data perfectly), I was very happy, but noticed that they aren't synchronized, they filter data only by their criteria (They filter data independently).. for example if i filter (Product: Desktops it shows all the desktops in the data and then if i filter Dealer: Companyname it shows everything what was bought by that company not the only desktops)

Where is my mistake, what I did incorrectly?
I use Combos After Update this VBA:

Private Sub FDealer_AfterUpdate()
Me.Filter = "[Dealer] = '" & Me.FDealer & "'"
Me.FilterOn = True
End Sub

Private Sub FProduct_AfterUpdate()
Me.Filter = "[Product] = '" & Me.FProduct & "'"
Me.FilterOn = True
End Sub

The Row Sources Are:

SELECT DISTINCT [QFILTER].[Dealer] FROM FILTER;
SELECT DISTINCT [QFILTER].[Product] FROM FILTER;

QFILTER is the Query Table based on my Main table [DATA]
QFILTER form is Based on Query [QFILTER]

Please Help, Thank you In Advanced
 
Each combo is only aware of itself.

You need to generate the filter based on multiple combos and concatenate them with AND or OR as appropriate.

This can be done by cycling thrrough all the relevant combos or reading the current filter and appending the
"AND somefield=" & Me.anothercombo
 
Thank You for the reply, but how to do this can you post according to my example above? I have to synchronize about 8 Combos to filter the Data perfectly.

Thank you very much
 

Users who are viewing this thread

Back
Top Bottom