Help please. (1 Viewer)

drunkwithlust

New member
Local time
Today, 13:59
Joined
May 1, 2007
Messages
3
Hello,
I have created a database for a DVD hire company. I am now creating a report based on the Hire table(Loans that have taken place) which is meant to show which should show all hires taken out for any given week and the revenue. However, I need the user to be able to enter the date from and then the system should add seven days and show all hires that have taken place in this time frame. I think i have to create a query in order to do this but im not sure. Would anyone be able to help me? Here's a print screen of what ive done so far (which doesnt work because i have no idea what to do) just incase it helps.


Thank you in advance.
 

Attachments

  • access.jpg
    access.jpg
    65.1 KB · Views: 100

lightray

Registered User.
Local time
Tomorrow, 08:59
Joined
Sep 18, 2006
Messages
270
Hi there, you've got the start of an idea. Yes it is best to create a query first If you want to create a calculation in a query it goes on the top line or you can create it on the page itself, best in the query though as you can run the query and see the results of what will eventually be on the report.
Something like ReturnsDue = [Date_Hired]+7
 

boblarson

Smeghead
Local time
Today, 13:59
Joined
Jan 12, 2001
Messages
32,059
Actually, I think you are looking for a RANGE (given a starting point and then the range between that starting date and 7 days later), am I right?

So, the criteria in your query (from your post) would be
Code:
Between [Enter Date Hired] And DateAdd("d",7,[Enter Date Hired])
But, if you do it that way you will be asked for the date twice. So, I would use a FORM with a text box to put the date into and then you can use the criteria of:
Code:
Between [Forms]![YourFormNameHere]![YourTextBoxNameHere] And DateAdd("d",7,[Forms]![YourFormNameHere]![YourTextBoxNameHere])
 

Users who are viewing this thread

Top Bottom