
June 18th, 2004, 08:21 AM
|
|
Registered User
|
|
Join Date: Jun 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Clueless with Query
Greetings, I have no development background, but have been tasked to create a new report or combine parts of two existing reports in Access 2002 (with SQL as the back end). I'm trying to add a section to the report, but I was told I have to edit the query first to show the data in the tables not mentioned already. I understand the SELECT part, but not the FROM with all the joins. I've tried using the Help and a borrowed Access 2002 book, but it looks so confusing. Here's the query... Can someone please tell me what's wrong with it? Any assistance is greatly appreciated!!!
SELECT FINPLAN.APC, [APC TABLE].APC, [I2S DOLLAR TABLE].FY, FINPLAN.PURPOSE, FINPLAN.QTR, FINPLAN.AMMOUNT, FINPLAN.[EXT AMMOUNT], FINPLAN.[UFR AMMOUNT], FINPLAN.COMMENTS, [APC TABLE].BA, [APC TABLE].MDEP, [I2S DOLLAR TABLE].EOR_DETAIL, [APC TABLE].EOR, [APC TABLE].[SECTIOLOOKUP] AS [SECTION], [SECTION LOOKUP TABLE].[SECTION NAME], tblCommitments.strDocNumber, tblCommitments.dtmDate, tblCommitments.strPurpose, tblCommitments.strPurchasedFor, tblCommitments.curTotalAmount, FINPLAN.[RECORD ID], tblObligations.dblAwardedAmount, [I2S DOLLAR TABLE].[I2S ID], [APC TABLE].[I2S ID], tblCommitments.strFINPLANiD, tblObligations.strDocID, tblCommitments.strDocID
FROM [I2S DOLLAR TABLE] INNER JOIN (([APC TABLE] LEFT JOIN [SECTION LOOKUP TABLE] ON [APC TABLE].[SECTION LOOKUP] = [SECTION LOOKUP TABLE].SECTION_ID) INNER JOIN FINPLAN ON ([APC TABLE].[APC ID] = FINPLAN.[APC ID]) AND ([APC TABLE].[APC ID] = FINPLAN.[APC ID])) ON [I2S DOLLAR TABLE].[I2S ID] = [APC TABLE].[I2S ID] AND LEFT JOIN (tblCommitments LEFT JOIN tblObligations ON tblCommitments.strDocID = tblObligations.strDocID) ON FINPLAN.[RECORD ID] = tblCommitments.strFINPLANiD
WHERE ((([I2S DOLLAR TABLE].FY)=[forms]![mnufrm - Reports Screen].[openargs]));
|