Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter query

Status
Not open for further replies.

splats

Technical User
Jan 2, 2003
131
My query works fine in SQL however it does not work in a report.

Here is the code:

SELECT [DCR Incidents].IncidNumber, Employee.EMPNO, Employee.NAME, Employee.OCCUPATION, Employee.STARTDATE, [DCR Incidents].*
FROM Employee INNER JOIN [DCR Incidents] ON Employee.EMPNO = [DCR Incidents].Empno
WHERE ((([DCR Incidents].IncidNumber)=[Forms]![frmEmployee]![sfrmDCRIncidents]![IncidNumber]) AND ((Employee.EMPNO)=[Forms]![frmEmployee]![EMPNO]))
ORDER BY Employee.NAME;


When I use it as a source for the report, it asks for a parameter for DCR Incidents.

It also does not show the subreport that is attached. The code of the subreport is:

SELECT [Employee].[EMPNO], [tblPreventions].[Prevention], [tblPreventions].[Completed], [tblPreventions].[CompletionDate], [tblPreventions].[TargetDate], [tblPreventions].[IncidNumber] AS tblPreventions_IncidNumber, [DCR Incidents].[IncidNumber] AS [DCR Incidents_IncidNumber]
FROM Employee INNER JOIN ([DCR Incidents] INNER JOIN tblPreventions ON [DCR Incidents].[IncidNumber]=[tblPreventions].[IncidNumber]) ON [Employee].[EMPNO]=[DCR Incidents].[Empno]
ORDER BY [tblPreventions].[CompletionDate];

funny thing is that the subreport query works great on it's own, but in the report it does not display.

any thought would be greatly appreciated.

Thank you





This is built in access 2000 the query (SQL format) seems to have something to do with the subreport query although it works fine on it's own as well. If i remove the subreport, it asks for a parameter for [DCR Incidents]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top