Creating a query to display a weeks records

shabbaranks

Registered User.
Local time
Today, 12:39
Joined
Oct 17, 2011
Messages
300
Hi,

Im trying to create a query which will allow the user to print a weeks report. My current method prompts for between but that doesnt work as the user would have to put a day either side to get the desired result. What I was thinking was prompt for a begining date and then add on 5 which gets the working week?

Cheers
 
I already looked through that before posting. The problem with that example is that its not a prompt it specifies the criteria. The "working week" which I am trying to find will always have a different starting value but I would always want the following 4 days (5 in total) from the point inwhich is entered.

Does that make sense?
 
Hello.. i think i have found what the problem is.. and it is working fine.. so what you need to do is..

Between #"&[Enter Start Date]&"# And #"&[Enter Start Date]&"#+5

Think the above would work..
 
Woulden a parameter query do the trick:

Code:
PARAMETERS StartDate DateTime;
SELECT *
FROM MyTable
WHERE MyDateField Between [StartDate] And [StartDate]+5;

JR
 

Users who are viewing this thread

Back
Top Bottom