filter records by week number

kevin19

Registered User.
Local time
Today, 17:22
Joined
Jan 28, 2013
Messages
81
dear all

i have searched through the forum trying to get a solution as per above subject but to no avail eventhough I have gone through the 20 pagaes of threads. Maybe somenone can help me??

I have a summary form with the company name,week number, week-ending automatically populated.
e.g. this week is week 4 and users enter records for week 4 as the week number is automatically generated. Basically the system will just recognise today's date and generate the week number.
Problem is I am trying to display previous week records and I do not know how to filter it as my week number is generated automatically, week by week.
All the other forms are linked to this week number.
How can I display records for a specific week that I want? say, I want to display all records for week2, etc.
I am dumbfounded as I am on a learning curve with Access.
Can anyone help, please?

I also trying googling but nothing.....
Thanks!
 
you can get a week number (eg in a query) with

format(somedate,"ww")

there are also options for determining which weekday sets the first day of the week, and for when week 1 actually starts.


just add this to your query, and you should be able to filter on this column directly.

weeknumber: format(somedate,"ww")
 
Thanks Gemma for your prompt response!

I have the week number in my query. My subform is linked to the main form by the company ID.
Therefore, my subform records will show all the week numbers records i.e. wk.1,2, etc.
The week number in the main form is generated automatically.
If this week is week 4, it will show all the weeks records in the subform.
How can I filter it just to show the current week or previous week?
I hope I make it clearer this time round.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom