First Timer

  • Thread starter Thread starter MCG
  • Start date Start date
M

MCG

Guest
How do I get a list to come up dependant on the previous list selection? eg Entering details into a Car Database on field MAKE (Ford, BMW etc) - the next field MODEL selects the right list relevant to the MAKE selection eg (Focus, Ka, Fiesta or 3 Series, 5 Series, 7 Series)!!

Does this question make sense? I am brain dead now. Be gentle with me, I am new to Access (if you couldn't tell).

:confused: MCG
 
You'll want to search the archive for cascading combo boxes or something similar - there's been loads of questions regarding this, and even some examples too.
 
Table:

Customers
---------------
CustomerID (PK)
Customer

Table:

Models
---------
ModelID (PK)
Model

Table:

CustomerModels
---------------------
CustomerID (PK sort of...access gui allows you to place a key next to this field..and the field below it)
ModelID (PK sort of...access gui allows you to place a key next to this field and the field above it)
(Side Note: A table ONLY has one PK...the gui just shows you a key next to each field...you may index on these fields as well).

Anyhow on your form or what not...
you place 2 combo boxes...one displaying your customers...
the other to display models for that customer.

In the after update of your Customer combo box you need to type:
Me.cboModels.Requery

Your Row source for cboModels should be:

Code:
SELECT CustomerModels.ModelID, Models.Model 
FROM Models INNER JOIN CustomerModels ON Models.ModelID = CustomerModels.ModelID
WHERE (((CustomerModels.CustomerID)=[Forms]![frmMain]![cboCustomers]))
ORDER BY Models.Model
 
Thanks for the help. (Mile-O-Phile / mission2java_78)

have sat here and tried to work it out for an hour!

I am thick when it comes to Access - actually i'm just THICK
Out of my depth springs to mind.

Need to get myself on a course.:mad:
 
:) :) :) mission2java_78

I am not one to lick butt.
However instead of the rest of my evening being ruined by a grumpy posture. I now have a huge weight lifted from my shoulders and feel like flying!

Anything I can help you with (naming fields etc) just give me a shout!

You are King!
 
I'm not a king...Im your local residential space cadet junior thanks to Mr. Raskew :D
 
Yea thanks for that.
Nice example, I've DL'ed it, mod'ed it.
Think it could be just what I needed.

Thanks
 
Almost got it...

O.k. so I've been following all of this trying to get it to work out. However in my DB I get asked for a parameter value. What am I doing wrong. If you want the files let me know but its like six tables.
 
Re: Re: First Timer

In the after update of your Customer combo box you need to type:
Me.cboModels.Requery

I think this is where I went wrong... where does this go?
 

Users who are viewing this thread

Back
Top Bottom