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

Being prompted twice for data parameter

Status
Not open for further replies.

BaconMakinWabbit

Programmer
May 27, 2002
24
0
0
CA
Hi.

I have a query that should ask the user for 3 parameters: OpenDateTime, CloseDateTime and Department.
I run the query and I am prompted properly for the parameters. The query runs for a minute and then I get propmpted for the date paramters AGAIN! I pasted the query below and as you can see there are only the three paramters listed....Any ideas?

SELECT dbo_ITRequestView.RequestID, dbo_ITRequestView.AssignedFullName, dbo_ITRequestView.OpenDatetime, dbo_ITRequestView.CloseDateTime, dbo_ITRequestView.Priority, TotalTime(OpenDateTime,CloseDateTime) AS TTR, (IIf(dbo_ITRequestView.Priority="critical",TTR/60,IIf(dbo_ITRequestView.Priority="important",TTR*0.3/60-2))) AS Satisfaction

FROM dbo_ITRequestView

WHERE (((dbo_ITRequestView.CloseDateTime) Between [Start yyyy-mm-dd hh:mm AM/PM] And [End yyyy-mm-dd hh:mm AM/PM]) AND ((dbo_ITRequestView.AssignedDepartment) Like [Department -Type exactly or * for all]) AND ((dbo_ITRequestView.Closed)=True))

ORDER BY dbo_ITRequestView.CloseDateTime;
 
Hi!

A couple of questions:

Is dbo_ITRequestView a table or a query?

What is the code from the function TotalTime?



Jeff Bridgham
bridgham@purdue.edu
 
The code for the TotalTime is a VBA function and yes, sorry the dbo_ITRequestView is a table. (Going from Oracle, mySQL to Access has been a stretch.)

The query worked fine this morning with no changes made except the addition of the OpenDateTime in the select statement.
The VBA function accepts 2 paramters which are the open and close time and it then calculates business hours between the 2 times. It basically discards weekends and after hours when it calculates the time.
Never had trouble with it before and it DOES return a correct record set...its just very annoying.
Unfortunately due to NDA I cannot post the code for the function (yes it's a small dumb bit of code but still...). Was hoping there was an easy answer to this that I overlooked.
Thanks,
Wade
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top