Closed Thread
Results 1 to 8 of 8

Car make/model list

Hybrid View

  1. #1
    Registered User
    Join Date
    11-25-2007
    Posts
    3

    Car make/model list

    Hi everybody. I'm new to the forum, and to programming in general.

    I have a project I'm working on for school that simply takes vehicle registration data from a userform and puts it into a searchable database in excel.

    I have no idea how to create a make/model/year list, like those you see on carfax or auto parts websites. Am I correct in calling those dynamic data validation lists?

    Is there some sort of code that I could find somewhere and adapt to my purpose, or am I absolutely going to have to create one from scratch? If so, is there a good source on how to do so?

    Thanks very much in advance,
    Casey

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    What are the requirements?
    • Define the database format?
    • Design a form for data entry and query?
    • Implement the form and its modes?
    What parts of this do you know how to do?

    What material has been provided for you to learn how to do it?

  3. #3
    Registered User
    Join Date
    11-25-2007
    Posts
    3
    The format is simply a spreadsheet. I can handle the output of data from the userform to the spreadsheet. I simply need help with the dynamic list of makes and models.

    I can't say I know how to do much at all. I'm not even in a programming-oriented major. I'm studying to be a naval architect. Its simply a class that we take as an intro to strategic problem solving.

    The only source I have to learn with is a text: Power Programming with VBA. I haven't managed to find much relevant information in it, though.

    I've found code in other programming languages for the very make/model list I need. Is there any source where I might find similar code for VBA?

    I'm sorry if I'm difficult to communicate with. I'm trying, I just don't know programming very well at all. Please let me know if I'm headed down the wrong path entirely.
    Thanks very much,
    Casey

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Casey, in Excel, a database is just a list of records -- data in rows, with a column header at the top that describes each column. So for a car database, it might be Make, Model, Year, VIN, color, upholstery, ... whatever you want to store.

    What data is in the database will determine how to lay out the form -- does that make sense?

    Do you have to implement the search functions from the form, or just design a form for data entry?

    As a future naval architect, you will base ship designs on requirements -- cargo ships, 12m yachts, and attack submarines diverge early, even to the point of always remaining buoyant. What are yours? Even if you were given none (as an exercise in strategic problem solving), you have to define some on your own before you can start coding.

  5. #5
    Registered User
    Join Date
    11-25-2007
    Posts
    3
    My database layout will include title-holder name, license plate #, color, year, make, model, insurance, and VIN.

    At this point, I need only to design a userform for input. I have most of it done, and have come across no problems save for the make and model inputs. For the sake of error-checking, I thought it best to use a listbox or drop-down menu for each, with the model list dependent upon the input for make. (An input of Ford in the make field results in only Ford vehicles listed in the model list, similar to most auto-parts websites.)

    For this specific situation, I don't know whether there is an easy, pre-made code for a data validation list that I could adapt, or whether I need to use a listbox and a bunch of case statements.

    I must apologize. I don't know that I was communicating my question very well. The requirements for the project are known, and I hope that I have conveyed them adequately now. The layout, and most of the coding, is very easy. My problems are isolated surrounding the design of the list.

    Thanks much,
    Casey

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    The attachment shows a way you could do it.

    There's a list of makes with models below them. G1 is named ptrMake, and right now, just for convevience, it has data validation to select any of the listed makes (a dynamic named range, rgnMake).

    To demonstrate how it works, select any make in G1. Then in the Names box (the box left of the formula bar), type rgnModel. You will see the list of models for the selected make highlighted. This is a dynamic named range that was recomputed according to the make in G1.

    The range is computed by the defined names that you can see via Insert > Name > Define.

    So in practice, you would initialize the Make listbox by applying rgnMake as the list. When a make is selected, store it in ptrMake. Then change the list for the Model listbox to rgnModel.

    This sheet would be for this specific purpose, and not the same sheet used for the database.

    There are many other ways you could do this -- this is the one I would choose only because it speaks to me and I could implement it readily.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-24-2020
    Location
    san antonio
    MS-Off Ver
    2003
    Posts
    1

    Re: Car make/model list

    Informative stuff for me as i also need the car models along with the registration year list and i am trying to find out its solution. This task is assigned by our car auctioning manager carzaamin(.)com/auction. Anyways, do you know that the Audi R8 and TT sports cars become electric cars. The German company Audi spoke about the next stage of the electrification of its cars. Many car brands are currently in the process of converting their cars to electricity. Some Audi models with internal combustion engines may be at risk, in particular the R8 and TT sports cars. The fact is that sales of small sports cars are declining in the world, and the appearance of their modern electric versions can significantly revive sales. Reports that the Audi TT may no longer be sold in the classic version appeared before. But the disappearance of the R8 with the internal combustion engine may not please the fans of the brand with experience. In order to carry out these plans, Audi may start working more closely with Volkswagen and Porsche on the development and use of architecture for new models. Thanks

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: Car make/model list

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1