29. september 2014 - 16:51Der er
9 kommentarer og 1 løsning
Main & Sub datasheet på form
Jeg har oprettet to tabeller relaterer main/sub( een til mange ) til hinanden og har kaskade opdatering/sletning.
Når jeg arbejder direkte i tabel main, kan jeg åbne/lukke for view/indtastning direkte i subtabel, hvilket fungerer udemærket, blot vil jeg gerne kunne overføre denne funktionalitet til en form/indtastningsformular, hvor jeg lettere kan styre brugerens adfærd ... hvordan gøres dette .... uanset hvad jeg forsøger med, kan jeg ikke få subtabellen vist i een og samme form !!
If you have cascade updates/deletes switched on between the main/sub tables then if you alter the primary key in main it will automatically get changed in the sub table.
What do you mean by ? "kan jeg åbne/lukke for view/indtastning direkte i subtabel"
Entering data into the sub table has nothing to do with cascade delete/update!
"... hvordan gøres dette .... " The same way as you normally would, with a main/sub form configuration.
The two tables both have 5 primary keys relating to each other, and those are updated in automatically in the subtabel.
The main table have 1 record per product ID per Year, but the subtable have 1-5 individual salesprices per product ID per year. This is where the "one to many" relation are.
The user should have the possibility to create/update/delete a product in the main table, and add the individual salesprice in the subtable using one userform.
The two tables both have 5 primary keys relating to each other, and those are updated in automatically in the subtabel.
This I understand The user should have the possibility to create/update/delete a product in the main table, and add the individual salesprice in the subtable using one userform.
and I would have a main form for the main record and a sub form for the sub records (salesprices)
Maybe seeing the dB (or example) would help explain.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.