![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Thanks, Phil! After some time I came with almost the same idea. But instead of "type" variable I introduced BOOL IsAssembly - to distinguish assemblies in components table. Now I've got another problem - I am unable to build up a query (in MS Access) for collecting data from two tables, one of which contains two columns for foreign keys from another table. ![]() |
#5
| |||
| |||
|
|
img src="https://lh4.googleusercontent.com/-x_yzVt4YF6k/TmpuchjbsrI/AAAAAAAAA-g/u2MkeK2sZbA/s800/ |
|
/> Here is my current db structure. |
#6
| |||
| |||
|
|
It is possible to do this. From the menu bar, select Tools, Options, Tables/Queries. Uncheck the "Enable Autojoin" checkbox. Open the Query design tool. First, show the table with the 2 foreign keys, TblJnComponentComponent . Then put your other table, TblComponents. Put your TblComponents a second time. Access will change the name of the second copy of the table. You can change the aliases to more meaningful ones. I use ParentItems and ChildItems. Draw the relationships from the first table to the second and the first table to the third. Select the fields you want to see in the query and save then test it. . |
#7
| |||
| |||
|
|
It isn't really necessary to change the options to do this. Create the query, add the tables, delete the 'autojoin' lines shown, and then draw the join lines you wish. Joan |
|
Bob Quintal wrote: It is possible to do this. From the menu bar, select Tools, Options, Tables/Queries. Uncheck the "Enable Autojoin" checkbox. Open the Query design tool. First, show the table with the 2 foreign keys, TblJnComponentComponent . Then put your other table, TblComponents. Put your TblComponents a second time. Access will change the name of the second copy of the table. You can change the aliases to more meaningful ones. I use ParentItems and ChildItems. Draw the relationships from the first table to the second and the first table to the third. Select the fields you want to see in the query and save then test it. . |
#8
| |||
| |||
|
#9
| |||
| |||
|
#10
| |||
| |||
|
|
"Joan Wild" <jwild (AT) nospamtyenet (DOT) com> wrote in news:xn0hixu6q0000001 (AT) nntp (DOT) aioe.org: It isn't really necessary to change the options to do this. Create the query, add the tables, delete the 'autojoin' lines shown, and then draw the join lines you wish. Joan While experienced users like you and I can deal with Access's being 'helpful', I've found that it often confuses neophytes. I've also found that in a family tree structure like this one, that it sometimes crashes when trying to add the relations. Bob Bob Quintal wrote: It is possible to do this. From the menu bar, select Tools, Options, Tables/Queries. Uncheck the "Enable Autojoin" checkbox. Open the Query design tool. First, show the table with the 2 foreign keys, TblJnComponentComponent . Then put your other table, TblComponents. Put your TblComponents a second time. Access will change the name of the second copy of the table. You can change the aliases to more meaningful ones. I use ParentItems and ChildItems. Draw the relationships from the first table to the second and the first table to the third. Select the fields you want to see in the query and save then test it. . Sorry, Bob & Joan |
![]() |
| Thread Tools | |
| Display Modes | |
| |