I have a database where order numbers are entered by a group of 25 users. The Access database is split. As each order number is entered, a time stamp using a general format is used on the table. Now, I have first been asked to generate a report based on production over time. That's fine. I can do a sql query using > and < in the where section (because it shows hours minutes and seconds, I use this ) Now, my bosses want reports where they can choose a start date/time and an ending date/ time for a specific time frame. for example, they would like a report for Monday, September 10 to Tuesday, September 19 but only for the period of 6:00AM to 8:00AM only, with totals. I don't know how to go about it.
Any help is appreciated
Richard
6 2043
I have a database where order numbers are entered by a group of 25 users. The Access database is split. As each order number is entered, a time stamp using a general format is used on the table. Now, I have first been asked to generate a report based on production over time. That's fine. I can do a sql query using > and < in the where section (because it shows hours minutes and seconds, I use this ) Now, my bosses want reports where they can choose a start date/time and an ending date/ time for a specific time frame. for example, they would like a report for Monday, September 10 to Tuesday, September 19 but only for the period of 6:00AM to 8:00AM only, with totals. I don't know how to go about it.
Any help is appreciated
Richard
Is that a period of 6:00AM to 8:00AM each day?
Write up a quick sql query using your dates and including the fields you want to total (and you'll likely need >=, and <= on the date fields to get the right results) and post back with the sql code (please also wrap this in the code tags by selecting the sql text and clicking # at the top of this reply window, then manually edit the first tag to look just like this: [code=sql] )
Thanks!
Regards,
Scott
Hi Scott, Here is the sql statement, note that this statement is only for one day, I need to be able to select a range, say a week. - SELECT queues_members.members_id, queues_members.username, queues_members.initials, queues_members.queue, queues_members.cell, queues_members.status, Count(queues_members.BIB) AS BIB, Count(queues_members.BIBr) AS BIBr, Count(queues_members.MRD) AS MRD, Count(queues_members.PT) AS PT, Count(queues_members.DE) AS DE, Count(queues_members.DEr) AS DEr, Count(queues_members.WF) AS WF, Format([date],"m/d/yyyy") AS datet
-
FROM queues_members
-
WHERE (((queues_members.date)>=#8/16/2007 5:30:10 AM# And (queues_members.date)<=#8/16/2007 8:2:10 AM#))
-
GROUP BY queues_members.members_id, queues_members.username, queues_members.initials, queues_members.queue, queues_members.cell, queues_members.status, Format([date],"m/d/yyyy");
-
Thanks, Richard
Is that a period of 6:00AM to 8:00AM each day?
Write up a quick sql query using your dates and including the fields you want to total (and you'll likely need >=, and <= on the date fields to get the right results) and post back with the sql code (please also wrap this in the code tags by selecting the sql text and clicking # at the top of this reply window, then manually edit the first tag to look just like this: [code=sql] )
Thanks!
Regards,
Scott
What you will need to do is separate out the date and time sections from your queues_members.date field into two separate fields. It's a good idea to rename your field something other than Date also, since this is a reserved word in Access/VBA. Then you can run a simple parameter through for the date range, and do the same with the time range as well.
I suggest something like MemWorkDate for the date, and MemWorkTime for the time field.
You can right-click on the query window and choose Parameters. Place four parameters: [Start Date], [End Date], [Start Time], [End Time] all with data types of Date/Time.
Back in the query design grid, in the criteria for your MemWorkDate type in Between [Start Date] And [End Date], and in the criteria for you MemWorkTime: Between [Start Time] And [End Time].
This will pop up the parameter windows to prompt you to enter the date range you want, as well as the time range you want.
Regards,
Scott
Thanks Scott, I will try it out.
What you will need to do is separate out the date and time sections from your queues_members.date field into two separate fields. It's a good idea to rename your field something other than Date also, since this is a reserved word in Access/VBA. Then you can run a simple parameter through for the date range, and do the same with the time range as well.
I suggest something like MemWorkDate for the date, and MemWorkTime for the time field.
You can right-click on the query window and choose Parameters. Place four parameters: [Start Date], [End Date], [Start Time], [End Time] all with data types of Date/Time.
Back in the query design grid, in the criteria for your MemWorkDate type in Between [Start Date] And [End Date], and in the criteria for you MemWorkTime: Between [Start Time] And [End Time].
This will pop up the parameter windows to prompt you to enter the date range you want, as well as the time range you want.
Regards,
Scott
It works!
Thank You Scott!!
It works!
Thank You Scott!!
You're quite welcome! Pleased it's working for you...
Regards,
Scott
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Eric Whittaker |
last post by:
here's my dilemma, on the program below, i am trying to calculate overtime
pay at time and a half, but instead of only counting the hours after 40, it
counts all hrs at that rate, how can i avoid...
|
by: Jamie Pittman via AccessMonster.com |
last post by:
I am currently working on a project to take an employees time for a day and and if over 8 hours it would move those extra hours to overtime row amd not caculate into regular time. I started to use...
|
by: Jamie Pittman via AccessMonster.com |
last post by:
I have two tables with 5000 entries on them. One is based for regular time
with several variables example (employee name, date,time in and out, code,
customer, building) I have another table that...
|
by: michb |
last post by:
I need to be able to calculate on a daily basis, both normal and
overtime hours for both payroll and job costing.
I also then need to calculate the above on a weekly basis, in order to
complete...
|
by: Mr. Ken |
last post by:
I am calculating the phase of an IQ signal, which are polluted by AWGN
gaussian
noise. Thus, near pi/2, direct division of atan(Q/I) may yield outputs
either +pi/2 or
-pi/2. How do I handle this...
| |
by: hakunamatata5254 |
last post by:
Hi all,
In my project of multiple forms (main form, subform1, 2 , 3 etc)
(Main form is Employees, Subforms are Attendance, salary details, payment)
Now i want to calculate the payment based...
|
by: foxykitty |
last post by:
Hi,
How can I group in my qryMonthlyHours in SQL view by , and then sum done in that month?
I have another query - qrySaturdayRota
,,,,, ALL THIS IS GROUPED EXCEPT FOR
has a criteria...
|
by: simchajoy2000 |
last post by:
Hi,
I need to calculate a range of colors given the beginning and ending
colors in hex values (i.e. blue to red). I know there is a logic to
hex numbers and there is probably a fairly simple...
|
by: Umesh |
last post by:
i want to calculate the time required to execute a program. Also i
want to calcute the time remaining for the execution of the program.
how can i do that?
pl mention some good websites for...
|
by: cori25 |
last post by:
Employee's input the shifts they want, once I have all this data I need to determine who will get what shifts depending on a reliability %, if thats the same then I look at the time stamp.
I have...
|
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,...
| |
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...
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |