Using a combo box to see whether companies have certain products

D

Daniel

Hi,

I have a form with different combo boxes in the header section. Based on
the selections made in these boxes, the form is filtered and the results
shown in the detail section as a continuous form. I want to add another
combo box that shows different product types. For example, one choice will
be Product1, which will show all companies that make Product1. The main
thing is that each product has 4 types, but all the user will care about is
whether a company has any of the types.

I'm not too familiar with VB, but I picture the combo box storing variables
that represent each product and whether any type of that product is made.
(Ex: Product1 in combo box = True If Product1A in table, Product1B in table,
Product1C in table, or Product1D in table equals True. ELSE Product1 in
combo box = False.

I understand that's not real syntax, but that's how it looks in my head.
Hopefully this all makes sense.

Thanks!
 
H

Hunter57

Hi Daniel,

A combo box usually gets its data from a query. Access Queries are

1. Easier to create in Access than VBA.
2. Incredibly powerful tools when collecting, sorting, displaying, or
calculating data.

A query for the combo box might look something like this:

SELECT DISTINCT tblProducts.ProductID, tblProducts.ProductType,
tblProducts.CompanyID, tblCompanies.CompanyName
FROM tblProducts, tblCompanies
ORDER BY Products

Or

SELECT DISTINCT tblCompanies.ProductID, tblProducts.ProductType,
tblCompanies.CompanyID, tblCompanies.CompanyName
FROM tblProducts, tblCompanies
ORDER BY Products

Hope it helps.
Hunter57
Just huntn' for the right data.
http://churchmanagementsoftware.googlepages.com
 

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