473,395 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

issue with creating a weekly report

Hi,

I desperately need your help here. I'm trying to work out a better way of producing a weekly report for a job that should show the weekly activities for last week and the current week using Access 03.

In the table "weeklytable", i have the following fields
WeeklyID
WeeklyActivities
ProposedActivities
WeekNo
Date
JobNo

Let's say, in the "weeklytable" table for a particular job, we know the date of the last weekly activities and the current date of the week, how do i work out how many weeks apart between them in VBA?

The reason for this is there might be a case where the job manager forgets to put in the report for the current weekly activities. So i need some sort of coding to let him/her know that there is a missing weekly activities.

Please feel free to suggest anything that may make this simple.

Thank you in advance
Feb 10 '08 #1
1 1819
MMcCarthy
14,534 Expert Mod 8TB
You can use the DateDiff() function.

DateDiff(interval, dateValue1, dateValue2, [firstdayofweek], [firstweekofyear])

Returns the difference in the specified interval between two given dates. e.g. DateDiff("yyyy", #01/05/2001#, #02/07/2006#) would return 5.

interval in your case would be "ww" which would return the number of weeks between two given dates.

[firstdayofweek] is optional. It specifies the first day of the week. Access assumes that Sunday is the first day of the week.

[firstweekofyear] is optional. It specifies the first week of the year. Access assumes that the week containing Jan 1st is the first week of the year.
Feb 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: shovan | last post by:
I am creating a customized Purchase order report using asp. I have developed the reoprt as it is displaying the amount against a sales rep within a specific date range.now values are dispalaying...
0
by: AR Hall | last post by:
This code goes through 3 work sheets in the same XL workbook, day, eve and night shift in each sheet their are columns representing production work orders and reject and downtime for each order...
1
by: Chrissie40park | last post by:
Hi I am having problems designing a Report in Access 2000. My master table is based on Job numbers, profiling Projects on which a number of staff are working. For resourcing reasons we need to...
3
by: mochatrpl | last post by:
I am looking for a way to make a query / report display the running average for total dollars. I have already set up a query to provide totals dollars per day from which a report graphly shows...
2
by: Ecohouse | last post by:
I'm using Access 2002. I'm creating a report dynamically using a crosstab query. I found the code for this on the Microsoft site. I noticed that the report doesn't go past six pages. How can I...
1
by: creative1 | last post by:
Hi Everyone, I need help in one more thing. I my report that I want to print under follwoing criteria: Weekly ---------------- Set start and end date automatically to last week Bi-Weekly ...
2
by: ksrashmi | last post by:
Hi , i want to validate the date range . it is weekly report . so exact date has to be enterd . pls help me in which way we need to validate weekly reports . is there any java script to...
9
by: magickarle | last post by:
Hi, I have a database in access with the following columns: Day AgentID ManagerID Grade They got information about agents and some grades. I would like to have ONE form with several...
11
ollyb303
by: ollyb303 | last post by:
Hello, I am using a dynamic crosstab report to track performance statistics for my company and I have hit a problem. I would like the option to track stats daily (for the last 7 complete...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.