listbox with sub list?

zwheeling

New member
Local time
Today, 09:54
Joined
Apr 4, 2011
Messages
6
Hi,

I have two tables, one that contains an overall list of parts and assemblies, and a second that contains a list of all parts that make up an assembly, what I am trying to do is display one overall list and when you double click an assembly on that list all the parts that make up that assembly appear just below the assembly that was clicked on but indented so you know they make up that assembly.

i.e.
(Before double click)
Part 1
Part 2
Assy 1
Part 3

(After double click on assy)
Part 1
Part 2
Assy 1
__Sub Part 1
__Sub Part 2
Part 3

How should I go about doing this, I was trying to figure it out with a listbox but I am not sure if it can be done. Please help. Thanks
 
  1. Define the Assembly field in Table1 as Primary Key.
  2. Open Relationships design screen from Tools menu.
  3. Place both Table1 and Table2 on the relationship design screen.
  4. Drag the Assembly field from Table1 and drop it on the Assembly field in Table2.
  5. Put check-mark in Enforce Referencial Integrity option and other options,if needed.
  6. Save and close it.
  7. Open Table1 in Datasheet View. You will find a plus (+) symbol at the left side of each Assembly item.
  8. Click on the + symbol to display the Parts List related to that Assembly item.

If you would like to work with two Comboboxes (one for Assembly and the other to display the Parts List) on a Form then try this example: Refresh Dependant Combo Box Contents
 
ok, thanks for the help, I actually already know how to do that with a table, I should have been more clear I appologize, I am looking to have that list in a form where the user can select using a check box to decide if they want to be veiwing Manufactured and/or Purchased parts, the assemblies show up with the manufactured parts, I actually already have a form that does what I want except that I use a listbox to output the list of parts, I just can't figure out how to get the sub parts to drop down when I click on the assembly, can I not do this with a listbox, should I be using the table directly in the form?
 

Users who are viewing this thread

Back
Top Bottom