Results 1 to 11 of 11
  1. #1
    Durks123 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    10

    Creating Combo Boxes Which Depend On Another Combo Box

    Wondering if anyone could help me. I am making a vehicle database for my business, i do have a little bit of experience when dealing with Access but not with VBA or any type of programming as such so really would like to stay away from this but if it has to be it has to be.

    So, at the minute i plan to have several tables for each different make listing the different models from that particular make of vehicle. For example, MAKE_Renault lists Clio, Megane and MAKE_Ford lists Mondeo, Focus, Ranger. Now, i have a table called 'Vehicles for sale' which is the main data table containing all information about the car and it is here where i would like the combo boxes to be i already have another table set up which is a one column table which just list the different make of vehicles called 'Make' so one of the combo boxes is looking up this and just relaying the results back in a combo box.

    This is the bit that i am struggling with now, i would like the first combo box which is the 'Make' one to influence the second to display the results only from the make which is specified in the first combo box so i would like it to look up the table which is listed in the 'Make' combo box. Is there any way of doing this.



    Thanks in advance .

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    The concept is typically called cascading combos:

    Baldy-Cascading Combos
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Durks123 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    10
    How do i get this to work across tables?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    You mean in a table, not a form? Can't to my knowledge, but I never let users into tables or queries directly anyway.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Durks123 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    10
    Yeah thats what i meant, a form yes.

  6. #6
    Durks123 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    10
    Hi again, i thought that because i was struggling to do this i would attach my file and see if you could have a quick look into what i am doing as i believe i am going wrong somewhere.

    I followed the guide on your website even to the point of doing another database and copying the information and tables, forms etc. from your examplar file but still no avail, even went into the drop down on the form and copied the SELECT [.....] ... [..] thing and again did not work.

    The way i would like this to work is the database has several different tables for several different makes of cars which then lists the different models in there respective table and i would like the get the drop down to refer to each of the different makers of cars on the first down down of the form.

    Any help and light your could give on the topic would be greatly appreciated as it is driving me crazy :s

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    For starters, Windows says the zip file is empty. If you have different tables for each make and model, you almost certainly have a normalization problem:

    Fundamentals of Relational Database Design -- r937.com
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    Durks123 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    10
    Try again eh! Attached is the database database_file.zip

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    As I mentioned, that's not a normalized design. I'd either have a Makes table and a Models table, where the ID field from Makes was in Models to relate them, or a single table with fields for Make and Model. The first is probably the more typical (and normalized) design, and it's how I've built vehicle db's.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    Durks123 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    10
    Thanks pbaldy for your help after a couple of hours of reading up on things and a little bit of trial and error i have finally done what i wanted. Again, thanks so much for your help really appricaited

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Happy to help, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 06-09-2013, 05:35 PM
  2. Replies: 2
    Last Post: 06-03-2013, 11:52 AM
  3. Replies: 21
    Last Post: 04-03-2013, 12:51 PM
  4. Replies: 4
    Last Post: 09-17-2012, 10:36 AM
  5. Creating a Form with 2 combo boxes and a text box
    By smorris4804 in forum Access
    Replies: 1
    Last Post: 06-17-2011, 02:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums