
Signature
thank you so much for your help
>there are two combs in a form. They are all based on select statements to
>fill data.
>one selection of a comb should decide the other's select statement's where
>clause.
Use the first combo box as criteria in the second combo
box's row source query. e.g.
SELECT f1,f2
FROM table2
WHERE f3=Forms!theform.combo2
Then in combo1's AfterUpdate event procedure:
Me.combo2 = Null
Me.combo2.Requery
You will probably also want the Requery line in the form's
Current event.

Signature
Marsh
MVP [MS Access]
clara - 27 Feb 2007 21:31 GMT
What there is an "All" option item in the first comb list.That will mean the
where clause will be erased away
clara

Signature
thank you so much for your help
> >there are two combs in a form. They are all based on select statements to
> >fill data.
[quoted text clipped - 14 lines]
> You will probably also want the Requery line in the form's
> Current event.
Marshall Barton - 28 Feb 2007 18:34 GMT
>What there is an "All" option item in the first comb list.That will mean the
>where clause will be erased away
You could reconstruct the second combo box's RowSource SQL
statement, but it might be easier to change the query's
criteria for field f3 to:
Forms!theform.combo2 OR Forms!theform.combo2 = "ALL"

Signature
Marsh
MVP [MS Access]