Not sure which forum this really belongs in! (1 Viewer)

Ngyie

New member
Local time
Today, 04:39
Joined
Jan 15, 2018
Messages
3
First of all thanks for the great forum.
Secondly I'm not too great with access, having not really used it that much. Hopefully I can change that a little.

At present I receive hours worked from a client along with pay rates and charge out rates along side these so I can work out gross profit for the week.

My access project so far has employee details, hours type fields (empty), pay rates and charge rates per hours type (should be split out I guess, certainly the empty hours type fields).

I have it to enter up new employees which seemed straight forward enough, my question is about when I enter the hours up. The hours field will initially be blank, the pay rates and charge rates will be populated by the figures held on file.
After the hours have been entered for specific employee I would like to save the hours, pay rate and charge rates to a new table called history and if applicable any changes to the pay or charge rates be updated to the original file.

Now is quite simply achieved in a form/subforms or queries or my worst fear some code/macros :eek: Yes that's how new I am.
Been having a look at Tradewinds example and blown my mind lol

Thanks for any insight.
Nigel
 

Ngyie

New member
Local time
Today, 04:39
Joined
Jan 15, 2018
Messages
3
Hmm been looking at the tables and thinking some more and have moved all hours and rates fields into the history table. There is no real need for this data to be in the employee table in any shape or form. I just need to be able to bring up the last values for the particular employee whilst not allowing the original values to be over written. But I would not want the previous hours to be populated as this could cause confusion and mistakes.
So, in my head it would be open form in add mode, select employee which would then read the latest entry in the table for said employee and populate the rates fields only. Hmm possible?
 

mike60smart

Registered User.
Local time
Today, 04:39
Joined
Aug 6, 2017
Messages
1,904
Hi Ngyie

You need at least 2 tables

tblEmployees
-EmployeeID - Primary Key - Autonumber
-Firstname
-Surname
(Other fields describing the Employee)

tblEmployeeWorkHours
-EmployeeWorkHours - Primary Key - Autonumber
-EmployeeID - Foreign Key - Number - Duplicates OK
-DateWorked - Date/Time
(Other fields to record hours worked)

You would create a relationships between tblEmployees & tblEmployeeWorkHours and Enforce Referential Integrity

You would then create a Main Form based on tblEmployees with a Subform based on tblEmployeeWorkHours.
 

Users who are viewing this thread

Top Bottom