Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Displaying Week Ending

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Regan - 21 Jul 2006 04:14 GMT
Hi, This one has been bugging me
This is my query

SELECT DISTINCTROW Format$(TimeSheet.Date,'ww yyyy',4) AS [Week Ending],
TimeSheet.Employee, Sum(TimeSheet.Units) AS [Sum Of Units], Count(*) AS
[Count Of TimeSheet]
FROM Employees INNER JOIN TimeSheet ON Employees.EmployeeID = TimeSheet.
Employee
WHERE (((TimeSheet.Date)>=[forms]![Startup]![1sttsent] And (TimeSheet.Date)<=
[Forms]![startup]![wkedng]) AND ((([TimeSheet].[Code]))<>24))
GROUP BY Format$(TimeSheet.Date,'ww yyyy',4), TimeSheet.Employee;

It show  the info i want.
Except for the Column (Week Ending), it displays the following

Week Ending
23 2006
24 2006 etc

Thou i want it to Display

Week Ending
04/06/2006
11/06/2006
18/06/2006

i have this query in a form.  Now i don't care if it is displayed ( 23 2006)
in query.  But i want to display it as ( 11/06/2006 ) in the form.  Can
anyone help me with this?

Thanks
John Spencer - 21 Jul 2006 13:00 GMT
Haven't tested this fully, but you might try something like the following to
calculate the week ending date.  If it doesn't work, at least it may give
you some ideas on how to do this.

DateAdd("d",4-Weekday(TimeSheet.Date,4),TimeSheet.Date)+ 6

> Hi, This one has been bugging me
> This is my query
[quoted text clipped - 29 lines]
>
> Thanks
Regan - 22 Jul 2006 07:50 GMT
ThanksJohn

I did end up getting the stupid magic box doing what i wanted. and have
learnt alot about Access in last couple of weeks. what an awesome program to
make things easier. i'll most probably be jumping on here again next week
asking more questions.
Thanks again

>Haven't tested this fully, but you might try something like the following to
>calculate the week ending date.  If it doesn't work, at least it may give
>you some ideas on how to do this.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.