title: How to select table values from combobox selection?
body: <p>I'm using an Access 2003 database and have 2 comboboxes I am trying to work with. The first box I have perfected already, which is a dropdown of different tables (categories of parts). Once that table is selected, I want to be able to look at the part numbers within that category through a dropdown box selection. From here I want to be able to pull up the correct report for that category with that part number in it so I can print a report for every part number. I'm sure I'll have to write some sort of VBA, Query or Macro AfterUpdate() code, but I just don't know how to fill that second combobox with the selected table's part numbers.</p>
  
  <p><a href="http://i.stack.imgur.com/6JySh.png" rel="nofollow">Click here for an image of my Menu layout</a></p>
  
  <p>Here's my Query for the first box to show the tables I want:</p>
  
  <pre><code>    SELECT Msysobjects.Name
      FROM Msysobjects
      WHERE (((Msysobjects.Name)  not Like "MSYS*" 
      And (Msysobjects.Name) not like "_*"
      And (Msysobjects.Name) not like "~*"
      ) AND ((Msysobjects.Type)=1))
     ORDER BY Msysobjects.Name;
  </code></pre>
  
  <p>And I think this is what I'll need to print after the second box has it's selection:</p>
  
  <pre><code>    Private Sub partnumberselect_AfterUpdate()
      DoCmd.OpenTable Forms![_Datasheet Printing].Form.TagLabelSelection.Column(1), acViewNormal
      End Sub
  </code></pre>
  
  <p>Thank you in advance and let me know if you have any questions.</p>