A week's worth of data starting on a date

opostal

Registered User.
Local time
Yesterday, 20:23
Joined
Jun 26, 2009
Messages
47
My goal is to have the database request a date from the user and with the date provide all the records that are within the calendar week of that date. I can manipulate the input so that the data entered is the first day of that week (i.e. Monday input only) in order to make this easier. If I do that I will need the query to return all records starting on that Monday all the way and including the following Sunday. Thank you in advance for any assistance you can provide.
 
The criteria for your query would be

Between [Forms]![YourFormName]![YourStartDateField] And DateAdd("d", 7, [Forms]![YourFormName]![YourStartDateField])
 
Thank you for the input Bob. I only have one problem to add to that which would be that the date has to be a parameter inquiry. How would I integrate that into this situation. I am attempting to pull up records that are entered daily by using an input parameter for the date field. Really dislike sounding foolish about this as I know there is a simple answer but the books I have purchased and the training DVD's I have bought do not resolve this for me. I have experimented for a couple of hours with your information including adding another field etc., but have been unsuccessful thus far. Thank you again for your time and assistance with those of us at the lower end of the learning curve!
 
I would say - use a form for input. Don't rely on Parameter input into queries. It is messy and you lose a lot of control. With a form it is much easier to do.
 
Great got it and I used forms as you suggested. It is now functioning like it should. Last question I have on this is in regards to results. I now have the correct data showing in the query results. On the report I am creating to display the data from the query we created, I would like to segregate the results by day.

In order to explain better, this query shows quantity of man hours applied to a project and displays the data per week now thanks to your help. I would like to display the data as a table which shows that on project X, we spent 1 hour on Monday, 3 hours on Tuesday, 6 hours on Wednesday etc.

I have not done my due diligence on this and am doing so now but thought since I was posting a big thank you, I would try to slide in one more request for a bit of advice...lol

Thanks again for your time and trouble.
 

Users who are viewing this thread

Back
Top Bottom