Hello,
I have an Access application with a number of forms. On opening one particular form, the application will sometimes appear to get stuck in a loop with 'Calculating... ' in the status bar for some time. This is a problem when using the database on a server, since it seems to be running the same query over and over again.
There is one form in particular I have a particular problem with. Both its form and subform are opened using WHERE filter criteria, using a string filter on Standards.refSt d.
Standards are linked to Narratives in a many-to-many relationship, i.e. there is a link table called Link-NarraStand that has the primary key of Standards in one column and Narratives in the other.
In the main form, there are a couple of DLOOKUPs in text boxes on the form.
MAIN FORM SQL:
SUBFORM SQL:
I have an Access application with a number of forms. On opening one particular form, the application will sometimes appear to get stuck in a loop with 'Calculating... ' in the status bar for some time. This is a problem when using the database on a server, since it seems to be running the same query over and over again.
There is one form in particular I have a particular problem with. Both its form and subform are opened using WHERE filter criteria, using a string filter on Standards.refSt d.
Standards are linked to Narratives in a many-to-many relationship, i.e. there is a link table called Link-NarraStand that has the primary key of Standards in one column and Narratives in the other.
In the main form, there are a couple of DLOOKUPs in text boxes on the form.
MAIN FORM SQL:
Code:
SELECT KLOEs.RefKLOE,
KLOEs.HeadingsRef,
KLOEs.DescKLOE,
OfficersKLOE.DescOfficer AS KLOEOfficer,
KLOEs.Element,
Themes.RefTh,
Themes.DescTheme,
Questions.RefQ,
Questions.DescQ,
Questions.Timescale,
Standards.RefStd,
Standards.StdExcellent,
Standards.StdFair,
Standards.SA,
Standards.[L4-DateStart],
Standards.[L4-DateEnd],
Standards.[L4-DateActual],
Standards.L4Team,
SAlevels.DescSA,
SAlevels.DescPlan,
Standards.Officer,
Standards.OfficerAudit,
Standards.L4weight
FROM ((KLOEs LEFT JOIN Officers AS OfficersKLOE ON KLOEs.Officer = OfficersKLOE.RefOfficer) LEFT JOIN Themes ON KLOEs.RefKLOE = Themes.KLOE) LEFT JOIN (Questions LEFT JOIN (SAlevels RIGHT JOIN Standards ON SAlevels.RefSA = Standards.SA) ON Questions.RefQ = Standards.Question) ON Themes.RefTh = Questions.Theme
ORDER BY KLOEs.RefKLOE,
Themes.RefTh,
Questions.RefQ,
Standards.RefStd;
Code:
SELECT [Link-NarraStand].*,
qL5NarrativesW.L5order,
qL5NarrativesW.Level,
qL5NarrativesW.Status,
qL5NarrativesW.TextNarrative,
qL5NarrativesW.TextNarrative2,
qL5NarrativesW.DateStart,
qL5NarrativesW.DateEnd,
qL5NarrativesW.DateComplete,
qL5NarrativesW.Progress,
qL5NarrativesW.Officer,
qL5NarrativesW.Archive,
qL5NarrativesW.EvidenceLink,
qL5NarrativesW.WeightL5,
qL5NarrativesW.L5wgtprog,
qL5NarrativesW.ModifiedOfficerL5,
qL5NarrativesW.DateModifiedL5,
qL5NarrativesW.RefManager,
qL5NarrativesW.NameManager,
qL5NarrativesW.DisOfficer,
qL5NarrativesW.DisDate
FROM [Link-NarraStand] LEFT JOIN qL5NarrativesW ON [Link-NarraStand].Narrative = qL5NarrativesW.RefNarrative
ORDER BY qL5NarrativesW.L5order,
qL5NarrativesW.DateStart,
qL5NarrativesW.DateEnd;
Comment