Auto-populate drop-downs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bdockery
    New Member
    • Feb 2007
    • 39

    #1

    Auto-populate drop-downs

    Here’s the deal. I'm more of a general Microsoft Admin, so I'm new to Access. My boss wants some type of PO request and tracking system setup, so I read a book on Access since it seems to be the ideal solution. The book gave a great overview, but It’s pretty plain I’m missing out on a lot of stuff.

    What I’m stuck on is this. I have a table of inventory items that includes item model, manufacturer, and price. In another table, (form eventually) I just want to be able to select the item model number from a drop-down and have the corresponding price and manufacturer drop-downs populate automatically.

    What I tried is using a drop-down lookup that references all three columns for 'model' 'make' and price.' Even though it shows all three, it only input the one value into the table, though.

    Any ideas? Is this that hard?

    Thanks!
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You have to set up a drop down lookup for each field.

    Comment

    • bdockery
      New Member
      • Feb 2007
      • 39

      #3
      I think you're misunderstandin g.


      There are three columns, price, model, and manufacturer. There's a lookup for each one.

      Is there a way to make the manufacturer and price lookups auto-populate when the corresponding model number lookup is selected?

      All these lookups are pulling from a seperate table where each model number has a corresponding manufacturer and price.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You can from code in a form. I don't think you can from a table however.

        Comment

        • bdockery
          New Member
          • Feb 2007
          • 39

          #5
          Can you give an example of the code?

          I know the basics of changing the code in VB

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            Let's say in the form you have ComboboxA and ComboboxB. A change in selection from ComboboxA will change what's in ComboboxB.

            So, in the after update event of ComboboxA you may have something along the following:
            Code:
            Private Sub ComboboxA_AfterUpdate()
            Me.ComboboxB.RowSource = "Select [Field Name] From TableName Where [Criteria Field] = '" & Me.ComboboxA.Value & "'"
            End Sub

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32669

              #7
              Does this Tutorial help with your requirement (Example Filtering on a Form.)?

              Comment

              Working...