Prompting for a user input

  • Thread starter Thread starter Jaz
  • Start date Start date
J

Jaz

I have a query that filters by a certain date. If I put that date in the
criteria field, it runs fine. If I make that field a prompt that ask for
the date then it takes forever to run.

Why is that ? What can I do about it?

Thanks,
Jasper
 
I have a query that filters by a certain date. If I put that date in the
criteria field, it runs fine. If I make that field a prompt that ask for
the date then it takes forever to run.

Why is that ? What can I do about it?

Thanks,
Jasper

Copy and Post your exact query SQL (with the prompt).
 
Here is the SQL code. Any Ideas on the problem?

SELECT PUB_EmpBasic.Name, PUB_EmpBasic.EmpID, PUB_LaborHed.PayrollDate,
PUB_LaborDtl.LaborType, PUB_LaborDtl.JobNum, PUB_LaborDtl.AssemblySeq,
PUB_LaborDtl.OprSeq, PUB_EmpBasic.SupervisorID, PUB_LaborDtl.LaborHrs,
PUB_LaborDtl.EarnedHrs, [EarnedHrs]/[LaborHrs]*100 AS Efficiency,
PUB_JobOper.ProdStandard, IIf([PUB_LaborDtl]![LaborType]='S' And
[PUB_LaborDtl]![EarnedHrs]=0,"True","False") AS SetupCond
FROM ((PUB_EmpBasic LEFT JOIN PUB_LaborHed ON (PUB_EmpBasic.EmpID =
PUB_LaborHed.EmployeeNum) AND (PUB_EmpBasic.Company = PUB_LaborHed.Company))
LEFT JOIN PUB_LaborDtl ON (PUB_LaborHed.LaborHedSeq =
PUB_LaborDtl.LaborHedSeq) AND (PUB_LaborHed.EmployeeNum =
PUB_LaborDtl.EmployeeNum) AND (PUB_LaborHed.Company = PUB_LaborDtl.Company))
LEFT JOIN PUB_JobOper ON (PUB_LaborDtl.OprSeq = PUB_JobOper.OprSeq) AND
(PUB_LaborDtl.AssemblySeq = PUB_JobOper.AssemblySeq) AND
(PUB_LaborDtl.JobNum = PUB_JobOper.JobNum) AND (PUB_LaborDtl.Company =
PUB_JobOper.Company)
WHERE (((PUB_LaborHed.PayrollDate)=[Enter Payroll Date]) AND
((PUB_JobOper.ProdStandard)<>0) AND ((IIf([PUB_LaborDtl]![LaborType]='S' And
[PUB_LaborDtl]![EarnedHrs]=0,"True","False"))='False') AND
((PUB_EmpBasic.Company)="Loc"))




ORDER BY PUB_EmpBasic.Name;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top