Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting forms to list boxes to forms

Status
Not open for further replies.

hrg

Programmer
Jan 8, 2009
46
US
I want to display a number of names in a list box in another form. e.g. When in the company form (contains details of company i.e. address, telephone,) I have a button in the form which says "view company contacts". When clicked a list box in another form appears. What i want is just to display the contact names that work for that company (so they both hold the same company name)to appear in the list box. Once the name appears in the list box the user can then double click on the contact name (so all details are displayed in contact form i.e. first name surname e-mail) so that it appears in the contact form (this bit i can code using links, modules, clng, value etc)

The relation ship is

Company

Company name
address

Contac/Employee

CompanyName
Firstname
Surname

companyname.company = companyname.contact

Also i can have 3 contacts for 1 company. But not the other way round.
Does anybody know how to do this?

Thank you
 
RadioCC,

This is pretty simple to achieve.

Create a query to get the contacts for a specific company.

Use this as the row source for your list box.

Then get the list box to requery every time the company changes.

HTH

Craig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top