Another Cry for Help

Associate
Joined
3 Aug 2003
Posts
2,028
Location
Plymouth, UK
Hi again.

Yet again I am plundering the wealth of knowledge that is OCUK.

Need a bit of help with my database again.

Have two tables, one for manufacturers and one for models of hearing aids they produce. Have them on the main data form as two combo boxes. What I want to achieve is that when you select a manufacturer from the first combo box ONLY their products appear in the second.

Have been struggling with this now for over a week.

It is probably a very easy thing to achieve, but as this is my first ever attemps at a database, everything is very new and rather overwhelming.

Thanks in advance to all who help

Paul
 
Are you needing the SQL for this to work out?

If you have two tables something like this:

Code:
Manufactures
==============
(id - prime key), manufactureName
------------------

Parts
==============
manID, partName
------------------

Then you'd need to do something like:

Code:
SELECT partName FROM Parts WHERE Manufactures.id = Parts.manID AND Manufactures.manufactureName = "whatever was selected in combo box";

Im not sure if you need to import the Manufactures table in the "FROM" section, I can't remember. But anyway, that should join the two tables, pump out a list of part names where the manufacture is of the correct name.

I think. I'm a little rusty :P. Is that what you needed?
 
I think so. Not sure on my table structure tbh. Set up as follows

tbl.Manufacturer

MfrID - autonumber
Mfr - text of Manufacturers name

tbl.Models

ModelID - Autonumber
Model - Manufacturers given name to model
MfrID - Number entry realting back to ID number given in tbl.Manufacturer

The two combo boxes are

cbo.Mfr
cbo.Model

Have tried putting in a query to filter down the results, but always end up with a blank second combo box.

Sorry to be a pain in the proverbial, but just cant for the life of me get this working. Will probably kick myself when i find out how easy it is

Cheers
 
Back
Top Bottom