This one has me stumped. I am running Access 2003 and have created a report with a column chart. The chart is based on the following query:
with the following record source for the chart x-tab:
Worked just fine, but now the users want to have the option of ALL as well as selecting a specific AMArea. So I did some research and changed my query as follows:
To account for no selection made on the ReportFrm [cboAMZone].
Query works great but will not translate to the X-tab as the chart record source. If no selection is made on [Forms]![ReportFrm]![cboAMZone] I get a blank report.
Can anyone help me see what I am missing? Thank you
Code:
SELECT BufferMgmt.BufferMgmtID, BufferMgmt.DateEntered, BufferMgmt.GLLink, GLInfo.AMArea, BufferMgmt.Shift, ZoneProcesstbl.Process, [FirstBreak]+[LunchBreak]+[SecondBreak]+[PostShift] AS TotalTime
FROM (BufferMgmt INNER JOIN ZoneProcesstbl ON BufferMgmt.ProcessID = ZoneProcesstbl.ZoneProcessID) INNER JOIN GLInfo ON BufferMgmt.GLLink = GLInfo.GLNumber
WHERE (((BufferMgmt.DateEntered) Between [Forms]![HoldingInfo]![TxtReportStart] And [Forms]![HoldingInfo]![TxtReportEnd]) AND ((GLInfo.AMArea)=[Forms]![ReportFrm]![cboAMZone]));
with the following record source for the chart x-tab:
Code:
PARAMETERS [Forms]![HoldingInfo]![TxtReportStart] DateTime, [Forms]![HoldingInfo]![TxtReportEnd] DateTime, [Forms]![ReportFrm]![cboAMZone] Text ( 255 );
TRANSFORM Sum(qryBufferTotal.TotalTime) AS SumOfTotalTime
SELECT qryBufferTotal.Process
FROM qryBufferTotal
GROUP BY qryBufferTotal.Process
PIVOT qryBufferTotal.Shift;
Worked just fine, but now the users want to have the option of ALL as well as selecting a specific AMArea. So I did some research and changed my query as follows:
Code:
PARAMETERS [Forms]![HoldingInfo]![TxtReportEnd] DateTime, [Forms]![HoldingInfo]![TxtReportStart] DateTime, [Forms]![ReportFrm]![cboAMZone] Text ( 255 );
SELECT BufferMgmt.BufferMgmtID, BufferMgmt.DateEntered, BufferMgmt.GLLink, GLInfo.AMArea, BufferMgmt.Shift, ZoneProcesstbl.Process, [FirstBreak]+[LunchBreak]+[SecondBreak]+[PostShift] AS TotalTime
FROM (BufferMgmt INNER JOIN ZoneProcesstbl ON BufferMgmt.ProcessID = ZoneProcesstbl.ZoneProcessID) INNER JOIN GLInfo ON BufferMgmt.GLLink = GLInfo.GLNumber
WHERE (((BufferMgmt.DateEntered) Between [Forms]![HoldingInfo]![TxtReportStart] And [Forms]![HoldingInfo]![TxtReportEnd]) AND ((([GLInfo].[AMArea])=[Forms]![ReportFrm]![cboAMZone]) Is Null)) OR (((BufferMgmt.DateEntered) Between [Forms]![HoldingInfo]![TxtReportStart] And [Forms]![HoldingInfo]![TxtReportEnd]) AND ((GLInfo.AMArea) Like [Forms]![ReportFrm]![cboAMZone]));
To account for no selection made on the ReportFrm [cboAMZone].
Query works great but will not translate to the X-tab as the chart record source. If no selection is made on [Forms]![ReportFrm]![cboAMZone] I get a blank report.
Can anyone help me see what I am missing? Thank you