Combo/List Box

G

Guest

Hello,
I have a form for all our companies profile information, within this form I
have a command button called "investments" which allows for as many
investments to be entered as needed.

I am trying to create a short-cut (pop-up) form which will allow for the
user to select a company from a combo box. Then based on which company they
select, I would like a list box next to this combo box which will list all
the investments for that company. Then, I would like to allow the user to
select an investment and click on a command button that would then open the
investment form in that company. I set up the combo box which shows all the
companies, but have no idea how to create the list box next to it to show the
selected company investments and the command button. Can anyone help me with
this or at least give me some guidance?
 
A

Al Camp

Lori,
Both the combo and listbox use a query behind them to supply the possible
entries. Given examples of cboCompany and lstInvestments...
In the listbox query, use this criteria on the Investment field...
= Forms!frmYourFormName!cboCompany
This will force the listbox to only show Investments related to the
Company value selected in cboCompany.
Do a... lstInvestments.requery on the AfterUpdate event of cboCompany so
that whenever cboCompany is enetered or changed, the listbox will
"re-synch."
hth
Al Camp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top