Combo Boxes - linking of

N

Nikkinovice

I know there is probably a simple answer to this, but am self taught on
access and am stuck :-(

Am using access 2003

Have 3 tables as follows:
Supplier Goods (id=primary key, supplier name, product desc) (- linked to
supplier info)
Supplier Info (Supplier Name=primary key), contact number etc (linked to
goods ordered)
Goods ordered(id=primary key, supplier, product desc etc (linked to an order
table)

on a form i have created 2 combo boxes, one to look up the supplier name,
then one to look up their products. the first combo works spot on, but the
second doesn't. i want the second combo box to only show the products for
the supplier selected in the first combo box. however at the mo it is
showing all products for all suppliers. i have tried changing the control
source of the second combo to 'supplier' but still not working.

Please treat me like an absolute beginner in any reponses and please help!

Thanks :)
Nikki
 
N

Nikkinovice

Hi Douglas

Just managed to re-find my post! Thanks for trying but I'm still
struggling, spend 12 hours yesteray and now 5 today trying to sort. Do you
know of somewhere where I can email my dbase to for checking. There probably
isn't anywhere but worth a shot!

I can get my second combo either to show no records or records from each
supplier - feeling a homer simpson moment coming on - doh!
 
D

Douglas J. Steele

Sorry, I'm not aware of any service that will let you email a database for
review (other than ones that charge)
 
R

Ray C

Hi Nikki
I feel very shy in coming back to you on this because I am very much a
novice myself and I will probably get this quite wrong. I had this issue some
short while ago and turned myself inside out in trying to find a working
solution. I don't know if you are past the problem now but you should have
something like a Suppliers table and a Products table. Suppliers should have
something like "SupplierID" (auto number Primary Key), "SupplierName" (text),
"Addr1" etc,etc. The Products table should have a "ProductID" (auto number
Primary Key), "SupplierID" (number). "ProductCode", "Product description" etc
etc
Your first combo box you seem to have working but your second combo box
should have something like the following in the program (using cmb_ComboBox2
as the name of the combo) :-
Me.ComboBox2.RowSource = "SELECT tbl_Products.ProductCode FROM
tbl_Products WHERE ((tbl_Suppliers.SupplierID) = (tbl_Products.ProductID)))
ORDER BY tbl_Store.Name"

I am not sure if I need that many sets of brackets but thgis should give you
an idea. I appologise if it does not work but that will probably be due to me
changing stuf arround to get the concept over to you.

If it helps, I have a whole block od code that deals with just exactly what
you are trying to do. If it helps at all I would be happy to e-mail it to you
if you drop me a line on rclethro at Bowshaw dot co dot uk. I have not
written this out in the normal format as I dont want various machines picking
up my e-mail and sending me any more junk than I already get.

Hope that this helps

Regards Ray C
 

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