Query Help - NEW USER

H

HelpMe!

I want my query to ask for the supervisor name, then a period end date. I
want the query to return anything for that sup that has not turned in a
report that was due between the specified dates. It is returning everything
due, regardless of the end date i enter.

SELECT Supervisors.SupervisorLast, Supervisors.SupervisorFirst,
[Supervisors]![SupervisorLast] & ", " & [Supervisors]![SupervisorFirst] AS
Expr1, EmployeeInfo.PUC, [EmployeeInfo]![EmployeeLast] & ", " &
[EmployeeInfo]![EmployeeFirst] AS EmployeeName, Probation.ProbeNumber,
Probation.PeriodStart, Probation.PeriodEnd, Probation.CompletionDate
FROM Supervisors INNER JOIN (EmployeeInfo INNER JOIN Probation ON
EmployeeInfo.EmployeeID = Probation.EmployeeID) ON Supervisors.ID =
EmployeeInfo.Supervisors_ID
WHERE (((Supervisors.SupervisorLast)=[Enter Supervisor Last Name]) AND
((Supervisors.SupervisorFirst)=[Enter Supervisor First Name]) AND
((Probation.PeriodStart) Is Not Null) AND ((Probation.PeriodEnd) Between
"#01/01/2007#" And [Enter an End Date]) AND ((Probation.CompletionDate) Is
Null))
ORDER BY EmployeeInfo.PUC, [EmployeeInfo]![EmployeeLast] & ", " &
[EmployeeInfo]![EmployeeFirst], Probation.ProbeNumber,
EmployeeInfo.Supervisors_ID, EmployeeInfo.PUC, EmployeeInfo.EmployeeLast,
EmployeeInfo.EmployeeFirst, Probation.ProbeNumber;
 
K

KARL DEWEY

What table and field would contain information on the supervisor's report
submittal?
 
H

HelpMe!

Probation

KARL DEWEY said:
What table and field would contain information on the supervisor's report
submittal?
--
Build a little, test a little.


HelpMe! said:
I want my query to ask for the supervisor name, then a period end date. I
want the query to return anything for that sup that has not turned in a
report that was due between the specified dates. It is returning everything
due, regardless of the end date i enter.

SELECT Supervisors.SupervisorLast, Supervisors.SupervisorFirst,
[Supervisors]![SupervisorLast] & ", " & [Supervisors]![SupervisorFirst] AS
Expr1, EmployeeInfo.PUC, [EmployeeInfo]![EmployeeLast] & ", " &
[EmployeeInfo]![EmployeeFirst] AS EmployeeName, Probation.ProbeNumber,
Probation.PeriodStart, Probation.PeriodEnd, Probation.CompletionDate
FROM Supervisors INNER JOIN (EmployeeInfo INNER JOIN Probation ON
EmployeeInfo.EmployeeID = Probation.EmployeeID) ON Supervisors.ID =
EmployeeInfo.Supervisors_ID
WHERE (((Supervisors.SupervisorLast)=[Enter Supervisor Last Name]) AND
((Supervisors.SupervisorFirst)=[Enter Supervisor First Name]) AND
((Probation.PeriodStart) Is Not Null) AND ((Probation.PeriodEnd) Between
"#01/01/2007#" And [Enter an End Date]) AND ((Probation.CompletionDate) Is
Null))
ORDER BY EmployeeInfo.PUC, [EmployeeInfo]![EmployeeLast] & ", " &
[EmployeeInfo]![EmployeeFirst], Probation.ProbeNumber,
EmployeeInfo.Supervisors_ID, EmployeeInfo.PUC, EmployeeInfo.EmployeeLast,
EmployeeInfo.EmployeeFirst, Probation.ProbeNumber;
 
K

KARL DEWEY

Try this --
WHERE ([Supervisors].[SupervisorLast]=[Enter Supervisor Last Name] AND
[Supervisors].[SupervisorFirst]=[Enter Supervisor First Name]) AND
([Probation].[PeriodStart] Is Not Null) AND ([Probation].[PeriodEnd] Between
#01/01/2007# And CVDate([Enter an End Date])) AND
([Probation].[CompletionDate] Is Null)

--
Build a little, test a little.


HelpMe! said:
Probation

KARL DEWEY said:
What table and field would contain information on the supervisor's report
submittal?
--
Build a little, test a little.


HelpMe! said:
I want my query to ask for the supervisor name, then a period end date. I
want the query to return anything for that sup that has not turned in a
report that was due between the specified dates. It is returning everything
due, regardless of the end date i enter.

SELECT Supervisors.SupervisorLast, Supervisors.SupervisorFirst,
[Supervisors]![SupervisorLast] & ", " & [Supervisors]![SupervisorFirst] AS
Expr1, EmployeeInfo.PUC, [EmployeeInfo]![EmployeeLast] & ", " &
[EmployeeInfo]![EmployeeFirst] AS EmployeeName, Probation.ProbeNumber,
Probation.PeriodStart, Probation.PeriodEnd, Probation.CompletionDate
FROM Supervisors INNER JOIN (EmployeeInfo INNER JOIN Probation ON
EmployeeInfo.EmployeeID = Probation.EmployeeID) ON Supervisors.ID =
EmployeeInfo.Supervisors_ID
WHERE (((Supervisors.SupervisorLast)=[Enter Supervisor Last Name]) AND
((Supervisors.SupervisorFirst)=[Enter Supervisor First Name]) AND
((Probation.PeriodStart) Is Not Null) AND ((Probation.PeriodEnd) Between
"#01/01/2007#" And [Enter an End Date]) AND ((Probation.CompletionDate) Is
Null))
ORDER BY EmployeeInfo.PUC, [EmployeeInfo]![EmployeeLast] & ", " &
[EmployeeInfo]![EmployeeFirst], Probation.ProbeNumber,
EmployeeInfo.Supervisors_ID, EmployeeInfo.PUC, EmployeeInfo.EmployeeLast,
EmployeeInfo.EmployeeFirst, Probation.ProbeNumber;
 
Top