View Full Version : Combo Box filtered data


jayme27
11-09-2001, 12:29 AM
Goal: To click on a drop-down combo box and see only those relevant CLINS belonging to their respective PURCHASEORDER.

Purchaseorder table has a one-to-many rel w/ CLINS in the CLIN table.

Up to this point I've already input the CLINS and matched them with their respective Purchaseorders.

I am now looking to charge payments against these CLINS. Each invoice is Purchaseorder specific.

Therefore, I need a field in the underlying Invoice table (also called CLIN) which can be used in the Payment/Invoice Form.

Problem: In the form, the CLIN combo box (CLIN from the INvoice table) displays all the CLINS from the CLINS table. How do I filter the drop down to display only those from that Purchaseorder on the Payment/Invoice Form?

Should be simple like an unbound field maybe? But how?

Chris RR
11-09-2001, 06:30 AM
Base your combo box on a query that will use the Purchase Order from your Payment/Invoice form in its criteria. Then, in the AfterUpdate for the purchase order field, do something like this:

Me.cboCLIN = Null 'null out the combo box
Me.cboCLIN.Requery 'requery it