Creating a recordset for previous week

A

Alan Fisher

I am trying to create a button that allows me to open
records where the date field has dates from last week. I
am going in the direction of using the datepart funtion to
show me the current week but I can't figure out how to go
from there to diplaying week - 1 in a Where clause to
open the form. Any ideas?

Thanks to those that helped me figure out I needed quotes
to make the datepart function work. I can't belive I
forgot them.
 
R

Roger Carlson

First day of Last week:
=DateDiff("d",Weekday(Date()-1,1),Date())-7
Last day of Last week:
=DateDiff("d",Weekday(Date()-1,1),Date())-1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top