Report based on parameter query but displays data that it shouldn't.

  • Thread starter Thread starter Jamie Pittman via AccessMonster.com
  • Start date Start date
J

Jamie Pittman via AccessMonster.com

I have a parameter query that works fine. It use from three different
coluns, date range , whse name, customer name. I built a report based on
this query, however the report has information that should have been
filtered off through the query. I ran the query and it selects the critera
fine but the report is in accurate. How can I fix this??????
 
I have never seen a report that contains records that are not included in
the report's record source. You need to provide more information since what
you suggest seems impossible to me.
 
Here is the copy of the SQL View that I would like to search the database
for date range (that works fine). I removed the criteria for the other two
colums. I want to be able to type the first few letters of the [Customer
Name] and the first two numbers of the [Whse Name] in this query and only
recive the search criteria that matches. Help...Please



SELECT [Employee Production Table].[Employee Name], [Employee Production
Table].Date, [Employee Production Table].TimeIn, [Employee Production Table]
..TimeOut, Format(DateDiff("n",[TimeIn],[TimeOut])\60,"0\:") & Format
(DateDiff("n",[TimeIn],[TimeOut]) Mod 60,"00") AS [Regular Total Time],
[Employee Production Table].Description, [Employee Production Table].
[Customer Name], [Employee Production Table].[Whse Name], [Allen Employee
Listing].[Regular Cost Per Hr], ([Regular Cost Per Hr]*DateDiff("n",[TimeIn]
,[TimeOut])/60) AS [Total Regular Cost], DateDiff("n",[TimeIn],[TimeOut])
/60 AS [Total Regular Hours]
FROM [Allen Employee Listing] INNER JOIN [Employee Production Table] ON
[Allen Employee Listing].[EMPLOYEE NAME] = [Employee Production Table].
[Employee Name]
WHERE ((([Employee Production Table].Date) Between [Start Date] And [End
Date])) UNION ALL SELECT [Employee Production Overtime].[Employee Name],
[Employee Production Overtime].Date, [Employee Production Overtime].[OT
TimeIn], [Employee Production Overtime].[OT TimeOut], Format(DateDiff("n",
[OT TimeIn],[OT TimeOut])\60,"0\:") & Format(DateDiff("n",[OT TimeIn],[OT
TimeOut]) Mod 60,"00") AS [OT Total Time], [Employee Production Overtime]
..Description, [Employee Production Overtime].[Customer Name], [Employee
Production Overtime].[Whse Name], [Allen Employee Listing].[Overtime Cost
Per Hr], ([Overtime Cost Per Hr]*DateDiff("n",[OT TimeIn],[OT TimeOut])/60)
AS [Total Overtime Cost], DateDiff("n",[OT TimeIn],[OT TimeOut])/60 AS
[Total Overtime Hours]
FROM [Employee Production Overtime] INNER JOIN [Allen Employee Listing] ON
[Employee Production Overtime].[Employee Name] = [Allen Employee Listing].
[EMPLOYEE NAME]
WHERE ((([Employee Production Overtime].Date) Between [Start Date] And [End
Date]));
 
I'm not sure how this question reflects your first question that suggested
the query and report were out of synch.

I would never use parameter prompts in queries. Consider using references to
controls on forms. Also, you should reconsider formatting results in your
query. Formats are normally applied in the form or report controls.
 
I am willing to try anything. I tried to make a form to do this but, I'm
sure that I did this incorrectly and couldn't get it to work with the
query. Can you give me any guidence how to create this form to make the
query. But then how would the report work?
 
Back
Top