ruenells
12-14-2007, 08:20 PM
I have posted twice under queries and still have not gotten an answer, so I am going to try here.
I am looking to be able to pull records for a specific period without having to enter the date range.
I need to be able run tuesday to thursday 11:00 am to 3:00 pm.
I am really not wanting to have to enter any specific dates. I was able to do this in Crystal Reports but I have not been able to replicate it in Ms Access.
Please help me!
Thanks
Dorinda:eek:
burrcm
12-15-2007, 01:49 AM
You can do it. Day numbers are 1 for Sunday through 7 for Saturday, so Weekday(DateField) will give you the day number, and you can limit it to the required days with a criteria of Between 3 And 5. Restrict the time using Hour and it should be OK.
Chris B
ruenells
12-15-2007, 08:12 AM
Thanks for the reply, I have never used those fields would you be able to give an example of how it would look, then I can manipulate it in my database.
I really appreciate the help
Rue
burrcm
12-15-2007, 01:31 PM
Sample attached. See the full data in the table and the query to produce the day and hour periods.
Good Luck
Chris B
ruenells
12-16-2007, 07:26 AM
Thank you so much for that database I think it might help. My last question (I hope) is that my date and time are in the same field. How do i get that information out of that field. Can i use DatePart??
burrcm
12-16-2007, 12:11 PM
Even easier. The functions can pull the required values from the combined field just as well. In reality all date/time fields are the same, it is just the displayed part which changes. See the updated sample.
Chris B
ruenells
12-16-2007, 02:03 PM
Well we are making progress that is encouraging.
Here is the problem it is pulling
It is pulling all of the data not the future dates. Meaning I should only see the records for next week so 12/18/07 11:00 am to 12/20/07 3:00 pm
Help!
burrcm
12-18-2007, 02:09 AM
Sorry. I forgot the last bit. This should do it.
Chris B