Combo Box???

C

CatchinOn

Thank you to anyome who can help me on this...

I have a form that produces quotes for our company, but before you reach the
quote form you must enter the client's information on a different form. There
can be up to 3 contacts for each company on the client's information page.

My Problem:
On the quote form I would like to have a drop down box with the choices of
the 3 contacts for that company so we know who the specific contact was that
called in the quote without havinig to fill in their name again.

I hope this is clear and understandable, but if you need further
clarification please let me know. I am new to these discussions.
 
B

Beetle

As long as the first form (the one for the Client info) remains open
while the quote form is opened, you can can refer to the ClientID
in the first forms record source through the row source query of your
combo box. So in the Row Source of the combo box on the quote
form you would put something like;

Select ContactID, ClientID, ContactName From tblContacts
Where ClientID = Forms!frmClients!ClientID

You'll need to use tha actual names of your objects of course
 
C

CatchinOn

Beetle,

Thanks for the quick reply, and I apologize but i am still having problems.

I have my customer table holding all the company and contact information.
The fields for my contacts hold the first and last name of the contact and
there is no contactID. Some of my fields from my customer table are
CustomerID, Contact1, Contact2 and Contact3.

On the quote form I would like to be able to choose either Contact1,
Contact2, or Contact3 from the drop down list. They are all in the same row
stored in the Customer table.

Can you have more than one field listed in the drop down list if all the
fields you want listed are in the same row in a table?

Thanks for your help again, i am pretty new to all this...
 
B

Beetle

Your Customers table is not properly normalized. You should not have
fields like Contact1, Contact2, etc. That information should be in a
separate Contacts table, with a 1-to-many reationship with the
Customers table. The table structure might look like;

tblCustomers
**********
CustomerID (Primary Key)
CompanyName
Address
City
CompanyPhone
other attributes of each Customer

tblContacts
********
ContactID (Primary Key)
CustomerID (Foreign key to tblCustomers)
LastName
FirstName
ContactPhone
other attributes of each Contact

This way, a Customer can have as few, or as many, Contacts as are
necessary and the scenario I described earlier will work for your
combo box.

With your current structure, if you ever need to have more than three
Contact names, you will have to add another field to you table and
subsequently redesign any queries, forms, an reports that are based on
this table. If the terms Relational Database and Normalization are new
to you, there is a good tutorial on the basics at this link.


http://allenbrowne.com/casu-22.html
 
T

troy23

You need to create a seperate table called Contacts. Have a primary
key field called ContactID which should be an autonumber datatype.

Split out the company information into a seperate table also. You need
to decide the relationships between the tables ...example does a
company have many contacts.


For FREE Access ebook and videos click here
http://access-databases.com/ebook
 

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

Similar Threads

Combo box help please 5
Combo Boxes 1
OnClick on Combo Box opens a New Form 0
Combo Box Filter 2
Combo Box 1
1 combo box changes per 2 other combo boxes 3
Combo box updates on a form 1
Combo Box Problems 3

Top