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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Parameters

Status
Not open for further replies.

jdwm2310

Technical User
Jul 26, 2001
396
US
Hello,

Is it possible to have more than one parameter in a query? If so, the query that I am working with will not generate the result for two criteria. When I remove one criteria the query will work by reporting the parameters result.
 
here is the sql:
SELECT HelpDesk.CallerName, HelpDesk.CostCenter, BusinessUnit([CostCenter]) AS [Business Unit], HelpDesk.[Date Call], HelpDesk.Area, HelpDesk.UserName, HelpDesk.[Date Closed], HelpDesk.[Route To], HelpDesk.[Call Source], HelpDesk.TicketStatus
FROM HelpDesk
GROUP BY HelpDesk.CallerName, HelpDesk.CostCenter, HelpDesk.[Date Call], HelpDesk.Area, HelpDesk.UserName, HelpDesk.[Date Closed], HelpDesk.[Route To], HelpDesk.[Call Source], HelpDesk.TicketStatus, HelpDesk.TicketID, HelpDesk.EMPID, HelpDesk.JobTitle, HelpDesk.Telephone, HelpDesk.RequestedQuestion, HelpDesk.[Answer/Comments], HelpDesk.[Solved by], HelpDesk.TimeWorked2, HelpDesk.[Caller Status], HelpDesk.Lock, HelpDesk.[Starting Date], HelpDesk.CompanyName, GetElapsedTime([Date Closed]-[Date Call])
HAVING (((HelpDesk.CallerName) Is Not Null Or (HelpDesk.CallerName)="Select Name") AND ((BusinessUnit([CostCenter]))=[Enter Business Unit]) AND ((HelpDesk.[Date Call]) Between [Enter Date Starting] And [Enter Date Ending]));

which is not currently working, however when I remove the AND ((HelpDesk.[Date Call]) Between [Enter Date Starting] And [Enter Date Ending] it shows me the records based on the businessunit.
If I remove the ((BusinessUnit([CostCenter]))=[Enter Business Unit]) and leave the Date Call section then I would have the date range parameter.

Any ideas on how I can have both parameter?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top