473,395 Members | 1,972 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.

creating a date range based form

Hope the subject is sufficient. Here is what is going on.

I need to create a form that will display data within a date range...
no
biggie. However, I'd like to keep it as close to the example I have
been
working off of, which is very similar to a datasheet view or crosstab
style.

Information I am going to pull is:
EmployeeID (should be a hidden field), Employee name (concatenated
data),
Pay Rate, Hours Worked, and then sum of payrate * hours worked. Then,
I need
to sum all of the pay amounts (sum of payrate * hours worked) on the
form
footer (which I assume will just be a dsum).

Also should say that I want to group the info by employee and only have
one
row of data per employee. So I need a total of hours worked and pay
rates
per day. There is a possibility that an employee could have a
different pay
rate assigned based upon the work they did.

Is there a way to do this and keep it in a crosstab-like style?

Hope that's clear enough. Any help is greatly appreciated!

Nov 28 '06 #1
4 2352
Would be nice for a bit of help. I'd greatly appreciate it.
fredindy wrote:
Hope the subject is sufficient. Here is what is going on.

I need to create a form that will display data within a date range...
no
biggie. However, I'd like to keep it as close to the example I have
been
working off of, which is very similar to a datasheet view or crosstab
style.

Information I am going to pull is:
EmployeeID (should be a hidden field), Employee name (concatenated
data),
Pay Rate, Hours Worked, and then sum of payrate * hours worked. Then,
I need
to sum all of the pay amounts (sum of payrate * hours worked) on the
form
footer (which I assume will just be a dsum).

Also should say that I want to group the info by employee and only have
one
row of data per employee. So I need a total of hours worked and pay
rates
per day. There is a possibility that an employee could have a
different pay
rate assigned based upon the work they did.

Is there a way to do this and keep it in a crosstab-like style?

Hope that's clear enough. Any help is greatly appreciated!
Nov 29 '06 #2
I am seeing a conflict in what you are saying you want.

You say only one per employee, but at the same time are saying that you
may have different payrates for different days. So what pay rate do you
want to show.

If you created a sum query that broke on employee and payrate, that
summed on hours, with criteria of the date range and created a field in
the query that was the product of that sum of hours times the payrate,
you would have everything EXCEPT the only one per employee you said you
wanted.
>From there it depends on what your answer to the question in para 2 is.
Ron.

Nov 29 '06 #3
Ok, I think I see what your saying. Here's the final result I'm
looking for (in regards to the employees).

If Employee A has 3 different jobs on the same day at 3 different pay
rates, I want to get the total amount of pay Employee A earned on that
day.

Ex.
Employee A
Day x does a job at rate 1 for 4 hours and earns a total of 60 bucks
Same day does a job at rate 2 for 2 hours and earns 40 bucks
same day does a job at rate 3 for 1 hour and earns 25 bucks

Desired result would be:

Employee Day x
A $125

Hope that lines up right.

Once that is resolved, I want to take Employees that worked during a
given date range and display them on a form and again on a report, in
crosstab fashion.

Hope that makes sense.
Ron2006 wrote:
I am seeing a conflict in what you are saying you want.

You say only one per employee, but at the same time are saying that you
may have different payrates for different days. So what pay rate do you
want to show.

If you created a sum query that broke on employee and payrate, that
summed on hours, with criteria of the date range and created a field in
the query that was the product of that sum of hours times the payrate,
you would have everything EXCEPT the only one per employee you said you
wanted.
From there it depends on what your answer to the question in para 2 is.

Ron.
Nov 30 '06 #4
Here is a simple query that will work for a simple table:

SELECT [pay table].Emp, Sum([pay table]![pay rate]*[pay table]![hours])
AS DayPay
FROM [pay table]
WHERE ((([pay table].wrkdate) Between [Enter Start Date] And [Enter End
Date]))
GROUP BY [pay table].Emp;
In place of the [Enter Start Date] and [Enter End Date] you can
reference two unbound fields on the form you are executing this from.

for example:

SELECT [pay table].Emp, Sum([pay table]![pay rate]*[pay table]![hours])
AS DayPay
FROM [pay table]
WHERE ((([pay table].wrkdate) Between Forms![Report Selection
Form]![Start Date] And Forms![Report Selection Form]![End Date]))
GROUP BY [pay table].Emp;

Ron

Nov 30 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mal | last post by:
Hello. I have a database that tracks reservations at a campground. I want to be able to make a calendar type report that shows how many people are here in given period. Stored for each...
3
by: manning_news | last post by:
Using A2K. I've been asked to modify a report currently requiring only one date parameter to now accept a date range. The main report has 2 subreports and is not bound to a table or query. The...
1
by: Reny J Joseph Thuthikattu | last post by:
Hi, I want to create a a crystal report based on the DAteTime Range.Can any one tell me how do i pass the Values from the VB.NET.I am uasing Crystalreportviewer control My field is isin the...
10
by: RoadRunner | last post by:
Hi, I have a employee vacation database that has a vacation table that has the employee name, pay week and date of vacation. I have another lookup table with pay week code and date range for the...
4
by: Joanie | last post by:
I have a form that records dates of unavailability for a worker. Based on what is entered in the simple table behind the form, many calculations take place to create employee "load" balance. Each...
2
blyxx86
by: blyxx86 | last post by:
I am very new to Access, and have only been using it for a month now. I have learned how to do a lot of things, but have been having problems making a form update a query that then is sent to a...
1
by: irfanali | last post by:
Hallo All, This is a Tool i m tryin to develop at work. I will explain how it works and then the Q I download a report from my ERP Tool on a daily basis and upload it into the Access Tool....
12
jaccess
by: jaccess | last post by:
Hello all, I am trying to create a running total based on a specific date range that is to be entered into a form. I currently have the form set up with 2 text boxes (date1 and date2) which are...
4
Sandboxer
by: Sandboxer | last post by:
I want to be able to program Access to provide for me, by individual day, what my contract obligations are to my customers. Will Access recognize all the individual days in between a date range...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
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 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.