How to use the requery in the form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a list which contains several suppliers and each of which has its own
products. How can I narrow the product selections after choosing particular
supplier. Is it right to use requery function?
 
AlanW said:
I have a list which contains several suppliers and each of which has its own
products. How can I narrow the product selections after choosing particular
supplier. Is it right to use requery function?


Assuming the products combo box's RowSource query uses the
supplier combo box in its criteria, then, yes you would use
Requery with this kind of code in the supplier combo box's
AfterUpdate event procedure:

Me.cboProducts = Null
Me.cboProducts.Requery

You will probably want to use the requery line in the form's
Current event too.
 
Back
Top