Hi Drew, Am Samstag, den 22.09.2007, 22:00 -0400 schrieb Andrew Jensen: > Well, if I understand your question properly then the answer should be yes. > > Master( ID, Val1...) > Master_Detail( ID, MasterID, Val2....) > Detail( ID, MasterID, MasterDetailID, Text.....) > > 1) You can link a sub form to its immediate master on more then one field. > 2) You can have fields in your sub_forms dataform control that are not > displayed.
That does work for concatenated 1:n-relations, been there, done that. But not in this case, see below. In general it seems to be a matter of table structure, maybe I'll get there somehow re-desiging the tables ... > So, just carry your MasterID all the way down to your detail > sub_sub_form and link on both MasterID and MasterDetailID. That should > do it. No, I can't. In your notation the tables are made this way: Master(ID, ...) Master_Detail(ID, MasterID, DetailID) Detail(ID, ...) And since it is m:n there can be multiple records in the Master table adressing hte same or different records in the Detail table. Think of it like a bibliography database where Master would hold the referencing documents and Detail is naming books or other publications. Or think of room planning, there are some groups or events and a couple of rooms. The allocation is done by inserting a record in the middle table. Pulling the MasterID into the Detail-table would mean violating normalization rules. Thanks for answering, Marc > On 9/22/07, Marc Santhoff <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm using a subform to show values of a m:n relation. > > > > Tables and relations: > > > > master master_detail detail > > ID(auto) > > ID(auto) <-> ID_master > > ID_detail <-> ID(auto) > > text > > > > > > The master_detail linking table is shown in a table control on a > > subform. > > > > One column of this table control shows the "text" field of the detail > > table linked by using a sql-based list field. > > > > No magic involved up to this point. > > > > But now I want to add one more row to the master_detail-table, a new > > record in the table control is made, the displayed "text" string for > > this one is selected. > > > > When the record is to be stored an error message appears telling that > > the field "ID_master" has to have a value (because it's a "NON NULL" > > colum). > > > > I will do this by using a little macro retrieving the current ID and > > write it to the subforms field, but: > > > > Could this be done without scripting? If yes, how? > > > > TIA, > > Marc > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
