10 pts.
 Subject: Limiting information in combobox
I have two comboboxes, one shows a list of customers, the other shows a list of contracts. One customer can have mutliple contracts, but a contract can only have one customer. I want to limit the contracts in the second combobox to only the contracts of the customer in the first combobox. I have set the rowsource of the combobox2 to SELECT ActiveContracts FROM ClientTable WHERE CLientName = Form.OrderEntryForm.Customer. I belive that it is select all contracts from the client table where the client name in the table matches the name in the combox1. The problem is when I run it a parameter value dialog box comes up and askes for a value for Form.OrderEntryForm.Customer, WHY? I have already selected a customer. I also set the combobox2 to requery within the After_Update() for the combobox1. Any other suggestions would be greatly appreciated.

Software/Hardware used:
ASKED: March 11, 2009  8:58 PM
UPDATED: March 12, 2009  8:44 PM

Answer Wiki:
You need to use the Forms collection to reference the filter value. Your RowSource where clause will look something like this: where CLientName = [Forms]![OrderEntryForm]![Customer]
Last Wiki Answer Submitted:  March 12, 2009  8:44 pm  by  Mycropht   15 pts.
All Answer Wiki Contributors:  Mycropht   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _