What technique can be used when returning a single value used as the entire field in a qry (Field 3; populated by a subquery) whilst also maintaining an editable recordset?
I have no relationship between the tables/ qry's nor do I want to. Surely it is possible?
EDIT - SQL:
Code:
(SELECT TendersT.[Margin%] FROM TendersT WHERE (((TendersT.Current)=True)))
I have no relationship between the tables/ qry's nor do I want to. Surely it is possible?
EDIT - SQL:
Code:
SELECT ActvCompositionT.ActvCompoID, ActvCompositionT.ActvTitleID_FK, ActvCompositionT.ResID_FK, ActvCompositionT.Constant, ActvCompositionT.Output, ActvCompositionT.[Waste%], ActvCompositionT.RtNtDesired, ActvCompositionT.RtGrDesired, Switch(IsNull([RtNtDesired]) And IsNull([RtGrDesired]) And IsNull([Output]),"c",IsNull([RtNtDesired]) And IsNull([RtGrDesired]) And IsNull([Constant]),"o",IsNull([Output]) And IsNull([RtGrDesired]),"cN",IsNull([Constant]) And IsNull([RtGrDesired]),"oN",IsNull([Output]) And IsNull([RtNtDesired]),"cG",IsNull([Constant]) And IsNull([RtNtDesired]),"oG") AS MethodCode, Round(IIf(IsNull([Output]),[Constant]*[Waste%],1*[Waste%]),6) AS ResQtW, Round(IIf(IsNull([Output]),[Constant]*(1+[Waste%]),[Output]*(1-[ResQtW])),6) AS ResQtGr, CCur(IIf(IsNull([Output]),[ResQtGr]*[ResRt],[ResRt]/[ResQtGr])) AS RtNtExcDisc, (SELECT TendersT.[Margin%] FROM TendersT WHERE (((TendersT.Current)=True))) AS [Margin%], CCur([RtNtExcDisc]*[Margin%]) AS RtMarginGr, (SELECT TendersT.[DiscInline%] FROM TendersT WHERE (((TendersT.Current)=True))) AS [DiscInline%], ([RtNtExcDisc]+[RtMarginGr])*[DiscInline%] AS RtDisc, [RtNtExcDisc]*[Margin%] AS RtMarginNt, [RtNtExcDisc]+[RtMarginNt] AS RtSalePrice
FROM ResourcesT INNER JOIN ActvCompositionT ON ResourcesT.ResID = ActvCompositionT.ResID_FK;
Last edited: