I have an Access database that tracks project information. The
database is very simple, except for 1 small aspect.
Some background: 4 Tables - Project information, Employees, activity
and pay rates.
The user will add an activity to a project. The activity will take
place on a date, so they will enter the date it took place and the
hours worked. The problem is that the employee might get an increase
during the project, which will need to be changed in the rates table.
This creates a new entry, keeping the old rate up to that date and I
then enter the new rate from that date.
If an activity is entered, I would like the database to automatically
look at the date the activity took place, and use the rate from the
rates table for that period.
I don't know if I have the correct apprach down for this database, and
any help would be appreciated. My boss is counting on me to make this
work, how, I don't know!
Sample table info and relationships:
Employees -- ID and name fields
Project -- ID and name, and details of project
Activity -- ID, Type of Activity, Date, employee ID and Project ID
Rates -- rateid, employee ID, rate, rate date from
Any ideas on how to make this work??
Please help!!!
--Ed 5 1713
You'll make life a lot easier if you have a from and a to date for the
rates... until a rate expires, use a far future date. It will be simpler to
use a BETWEEN criteria for a date than any other way. The tables seem to
assume that a minimum time for an activity is a full day... or you need to
add either To/From Time or HoursWorked to the Activity. I assume you want to
use the Text for the Activity... otherwise you may want to add an Activity
table with ActivityID and Description, etc. (if nothing else, that would
give you a check on data entry).
Larry Linson
Microsoft Access MVP
"Eddie" <ed**********@m ousetraining.co m> wrote in message
news:d5******** *************** **@posting.goog le.com... I have an Access database that tracks project information. The database is very simple, except for 1 small aspect.
Some background: 4 Tables - Project information, Employees, activity and pay rates.
The user will add an activity to a project. The activity will take place on a date, so they will enter the date it took place and the hours worked. The problem is that the employee might get an increase during the project, which will need to be changed in the rates table. This creates a new entry, keeping the old rate up to that date and I then enter the new rate from that date.
If an activity is entered, I would like the database to automatically look at the date the activity took place, and use the rate from the rates table for that period.
I don't know if I have the correct apprach down for this database, and any help would be appreciated. My boss is counting on me to make this work, how, I don't know!
Sample table info and relationships: Employees -- ID and name fields Project -- ID and name, and details of project Activity -- ID, Type of Activity, Date, employee ID and Project ID Rates -- rateid, employee ID, rate, rate date from
Any ideas on how to make this work??
Please help!!!
--Ed
Hi Larry, thanks for this. I know that I didn't tell you all the
fields in the tables. The activity table will have a hours worked on
it, very simple as we only use 1 or .5 hours. The problem is looking
up the activity date against the employee pay rate date started, and
returning the rate by the nearest match down . Its almost like the
following in a vlookup
vlookup (activity date,employee rate start date, rate).
I add activities by employee for each project. The database miust
return all the activities for the project, and the activity cost for
all or 1 employee.
Any examples would be great. I hope my blurb is clear enough.
Regards and thanks a million to anyone who helps,
Eddie Holder
Novice database builder.... ed**********@mo usetraining.com (Eddie) wrote in message news:<d5******* *************** ***@posting.goo gle.com>... I have an Access database that tracks project information. The database is very simple, except for 1 small aspect.
Some background: 4 Tables - Project information, Employees, activity and pay rates.
The user will add an activity to a project. The activity will take place on a date, so they will enter the date it took place and the hours worked. The problem is that the employee might get an increase during the project, which will need to be changed in the rates table. This creates a new entry, keeping the old rate up to that date and I then enter the new rate from that date.
If an activity is entered, I would like the database to automatically look at the date the activity took place, and use the rate from the rates table for that period.
I don't know if I have the correct apprach down for this database, and any help would be appreciated. My boss is counting on me to make this work, how, I don't know!
Sample table info and relationships: Employees -- ID and name fields Project -- ID and name, and details of project Activity -- ID, Type of Activity, Date, employee ID and Project ID Rates -- rateid, employee ID, rate, rate date from
Any ideas on how to make this work??
Please help!!!
--Ed
Under what circumstances do you want to perform this action -- it might be
done by joining the tables in a query, using a DLOOKUP in code, or ???.
Whichever way, my advice on having an end date as well as a start date for
the rate table still stands.
SELECT x FROM y WHERE z BETWEEN a AND b
is a lot easier than trying to order the records and pick only the first one
where current date exceeds the date in the record. Records in tables in
relational databases, unlike "vlookup", are, by definition, unordered. You
have to use an ORDER BY clause in the SQL to order them (this can be
generated by "Sort" in the Query Builder).
Assuming you only need to show the rate in a report (invoice), then joining
the tables in the Query that is the RecordSource of the Report would be the
proper approach.
Larry Linson
Microsoft Access MVP
"Eddie" <ed**********@m ousetraining.co m> wrote in message
news:d5******** *************** ***@posting.goo gle.com... Hi Larry, thanks for this. I know that I didn't tell you all the fields in the tables. The activity table will have a hours worked on it, very simple as we only use 1 or .5 hours. The problem is looking up the activity date against the employee pay rate date started, and returning the rate by the nearest match down . Its almost like the following in a vlookup
vlookup (activity date,employee rate start date, rate).
I add activities by employee for each project. The database miust return all the activities for the project, and the activity cost for all or 1 employee.
Any examples would be great. I hope my blurb is clear enough.
Regards and thanks a million to anyone who helps, Eddie Holder Novice database builder.... ed**********@mo usetraining.com (Eddie) wrote in message
news:<d5******* *************** ***@posting.goo gle.com>... I have an Access database that tracks project information. The database is very simple, except for 1 small aspect.
Some background: 4 Tables - Project information, Employees, activity and pay rates.
The user will add an activity to a project. The activity will take place on a date, so they will enter the date it took place and the hours worked. The problem is that the employee might get an increase during the project, which will need to be changed in the rates table. This creates a new entry, keeping the old rate up to that date and I then enter the new rate from that date.
If an activity is entered, I would like the database to automatically look at the date the activity took place, and use the rate from the rates table for that period.
I don't know if I have the correct apprach down for this database, and any help would be appreciated. My boss is counting on me to make this work, how, I don't know!
Sample table info and relationships: Employees -- ID and name fields Project -- ID and name, and details of project Activity -- ID, Type of Activity, Date, employee ID and Project ID Rates -- rateid, employee ID, rate, rate date from
Any ideas on how to make this work??
Please help!!!
--Ed
Hi Larry. I actually have found a solution to my problem. I used a sub
query to get the results. here is the syntax i used, with the help of
another user in the group.
SELECT employees.Name, rates.rate, Activity.Activi tydate,
Activity.Projec tName, Activity.Hours, [Hours]*[rate] AS [Total
Activity Cost]
FROM (employees RIGHT JOIN Activity ON employees.empid =
Activity.Empid) LEFT JOIN rates ON employees.empid = rates.empid
WHERE (((rates.effect ivedate)=(SELEC T MAX(EffectiveDa te)
FROM Rates WHERE EmpID = Employees.EmpID
AND EffectiveDate <= activity.activi tydate)));
Thanks for your advice. You and the aother user was of great help.
Thanks a million
ed
You are welcome. I'm glad you found a solution.
Larry Linson
Microsoft Access MVP
"Eddie" <ed**********@m ousetraining.co m> wrote in message
news:d5******** *************** ***@posting.goo gle.com... Hi Larry. I actually have found a solution to my problem. I used a sub query to get the results. here is the syntax i used, with the help of another user in the group.
SELECT employees.Name, rates.rate, Activity.Activi tydate, Activity.Projec tName, Activity.Hours, [Hours]*[rate] AS [Total Activity Cost] FROM (employees RIGHT JOIN Activity ON employees.empid = Activity.Empid) LEFT JOIN rates ON employees.empid = rates.empid WHERE (((rates.effect ivedate)=(SELEC T MAX(EffectiveDa te) FROM Rates WHERE EmpID = Employees.EmpID AND EffectiveDate <= activity.activi tydate)));
Thanks for your advice. You and the aother user was of great help.
Thanks a million
ed This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: VK |
last post by:
Dear All:
I have an issue trying to parse response from xml document, for that
matter I don't receive back response.
I am trying to integrate UPS e-commerce online tool into our web site,
this tool calcuates the rates and services and returns back all the
different shipping rates.
Below is the code trying to display the return response.
|
by: Ian N |
last post by:
Hi,
I'm trying to intergrate an XML data feed with an existing website to
provide currency conversions.
The rates will need to be stored in a MySQL database after the feed's
been updated by XE.com, the site will then access all of the rates via
the MySQL table.
I'm having problems figuring out how to get the rates into php and then
|
by: Eddie |
last post by:
Hi to all
I am building a database to track project expenses information. My
database has 4 main tables, Employees, Activity, project info and
rates.
We add a project and track activities on the project. Each employee
will add an activity on a certain date. What I need to do is check the
date the activity was added and then check what the rate is that
employee was paid during that period.
|
by: Zurghew |
last post by:
Hello all,
I have just created a database (partially) which will bill customers for
work done. However I am stuck when it is comes to different rates for
different works.
REQUIRED: What I intent to have is a form in which I will enter the customer
order no: and then in the subform choose the work done and then based on the
work input calculate the rates and have it billed to the customer. I have no
idea on how to have the rates...
|
by: PeteCresswell |
last post by:
The one I would up was a pivot table presentation"
Fund Year ReturnForYear ReturnForYearPlusPreceedingYear,
ReturnForYearPlusTwoPreceedingYears.....and so-forth.
But that design compromise has caught up with me as now I need rolling
quarterly and monthly returns in addition to just yearly returns.
Lottal records involved here....
| |
by: milam |
last post by:
Greetings,
I would like to use a query result as a column name in another query, I
can't seem to get this to work using Subqueries. Is there a good way to
do this?
Example:
Table "Employees":
Name Title
|
by: gertrude |
last post by:
I am a Computer Systems Engineer offering fast help with Java, C/C++,
PHP, JSP, XML/XSL, SQL, web design, network administration, algorithms
and more! http://www.homework911.150m.com
|
by: GPD |
last post by:
I thought I had done this before but cant see a way how.
Am sure I once opened a table and amended some data.
Anyone know if possible or how, any permissions needed from 10G EM.
PS
I know I can view the data. I want to amend a few values thats all.
Normally use toad but am on a 64 bit server. Hence no free toad.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |