What I would ike to do is...If their is a change in one or more of the 4
tables I have in my query. I would like it to update the master table. I
know
it is redundant to do this but I am here to fix it as quick as possible (3
weeks) and have over 40 queries plus 5 forms to do. This is simple I am
sure
but can not figure it out. How would you do it? Thsi should work
SELECT DEV_dbo_TblProduct.ProductId, dbo_TblProduct.ProductId,
IIf(dbo_tblProductversion.Attachments=True,"Y","N") AS Attachments,
IIf(dbo_tblProductversion.EAndOFlag=-1,"Y","N") AS EAndOFlag,
IIf(dbo_TblProductVersion.Countersignatures=-1,"Y","N") AS
Countersignatures,
dbo_TblProduct.StateAbbr, dbo_tblObligationType.ProductLine,
dbo_tblObligationType.BondType, dbo_tblObligationType.CategoryID,
dbo_TblProductVersion.NewBusinessFormID, dbo_TblProductVersion.RateType,
dbo_TblProduct.ObligeeId, dbo_TblProductVersion.RenewalMethod,
dbo_TblProductVersion.BondEffectiveDate,
dbo_TblProductVersion.BondExpirationDate,
dbo_TblProductVersion.BondTermMonths, dbo_TblProductVersion.BondAmtStd,
dbo_TblProductVersion.BondAmtMin, dbo_TblProductVersion.BondAmtMax,
dbo_TblProductVersion.CancelDays, dbo_TblProduct.[Available Online],
dbo_tblSaaDocument.ClassCode, dbo_TblProductVersion.RateCode,
dbo_TblProductVersion.SpecialInstructions,
dbo_TblProduct.BondObligationDescription, dbo_TblProductVersion.RiskType,
dbo_TblProductVersion.MinCreditScore, dbo_TblProduct.ObligationTypeID
FROM dbo_tblSaaDocument RIGHT JOIN (dbo_tblObligationType INNER JOIN
(dbo_TblProductVersion INNER JOIN (DEV_dbo_TblProduct RIGHT JOIN
dbo_TblProduct ON DEV_dbo_TblProduct.ProductId = dbo_TblProduct.ProductId)
ON
dbo_TblProductVersion.ProductId = dbo_TblProduct.ProductId) ON
dbo_tblObligationType.ObligationTypeID = dbo_TblProduct.ObligationTypeID)
ON
dbo_tblSaaDocument.SaaDocumentID = dbo_tblObligationType.SaaDocumentID
WHERE (((DEV_dbo_TblProduct.ProductId) Is Null)) OR
(((dbo_TblProduct.ProductId) Is Not Null))
WITH OWNERACCESS OPTION;
John Vinson said:
Well, probably you do NOT want to do this.
The whole *purpose* of the relational database model is to avoid
redundancy, which thereby avoids redundancy.
You store data ONCE, and once only, and then use Queries linking the
tables in order to bring the data from different tables together. If
you are attempting to store the data twice - once in a detail table,
and then store the same data again in a master table, you are misusing
Access! It is neither necessary nor proper to do so.
Instead, you would have a Table for each type of Entity relevant to
your data model; each piece of information would be stored once, in
its appropriate table. If you need to bring information together from
multiple tables (say for a Report) you would not copy that data into a
master table; instead, you would create a Query joining the tables
together, and base your report on that Query.
John W. Vinson[MVP]