Subject: Limiting information in combobox

10 pts.
Tags:
Access 2007
ComboBox
Microsoft Access
Microsoft Access 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.
ASKED: March 11, 2009  8:58 PM
UPDATED: March 12, 2009  8:44 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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]

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following