By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,116 Members | 1,319 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,116 IT Pros & Developers. It's quick & easy.

Filter Combo Box List

P: n/a
I have a combo box in a form for ContactName and a combo box with
CompanyName. I would like to limit the ConactName combo box to just
the names associated with CompanyName. Could someone please help me
out with this?

Thank you for all of your help.
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
John wrote:
I have a combo box in a form for ContactName and a combo box with
CompanyName. I would like to limit the ConactName combo box to just
the names associated with CompanyName. Could someone please help me
out with this?

Thank you for all of your help.


Not knowing your schema I'll take a stab at column/table names used to
give you an idea...

ComboBox: cboCompanyName
RowSource: Select CompanyName From tblCompany

ComboBox: cboContactName
RowSource: Select ContactName from tblContact Where CompanyName =
[cboCompanyName]

Sub Form_Current()
cboContactName.Requery
End Sub

Sub cboCompanyName_AfterUpdate()
cboContactName.Requery
End Sub

Note, in the contact name rowsource, if a saved query is used or it
doesn't work as expected (I have varying degrees of success with this,
well as varied as boolean can get:-) then use the full notation for the
company combo box in the form forms![MyFormName]![MycomboboxName]

--

\\\\\\
\\ \\ Windows is searching
\ \ For your sig.
\ \ Please Wait.
\__\

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.