Find week of date entered

  • Thread starter Thread starter Deb Struble
  • Start date Start date
D

Deb Struble

I would like the user to enter a date and for my query to return all the
records that fall within that week. For ex. if the user enters 12/15/2004
I need to show all the records between 12/12/2004 and 12/18/2004. I have
tried numerous things and nothing works. Any help would be greatly
appreciated! Thanks in advance!
Deb
 
Put the following expression in an empty field of your query:
WeekNum:Format([NameOfDateField],"ww")

Now say the user enters a date in a textbox named MyDate on a form named
MyForm. Put this expression in the criteria of WeekNum:
DatePart("ww",Forms!MyForm!MyDate)
 
Back
Top