473,396 Members | 1,784 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,396 software developers and data experts.

job history table

mseo
181 100+
hi,
I have a table for job history that contains the history of the rotations between the departments for specific employee
then
I have form for Edit employees and I need when I open this form on specific employee and edit the department textbox to insert new record with new department and start date ( date of edit) and end date (today) as long as he still in the same department
I am using bound controls in my form
any suggestion would be appreciated
thank you very much
Jun 15 '10 #1
6 2112
MMcCarthy
14,534 Expert Mod 8TB
Mseo

You haven't given enough information to allow anyone to attempt to answer your question. Please provide the metadata of this table and if different the metadata of the table behind the bound controls on your form.
Here is an example of how to post table MetaData :
Table Name=tblBookings
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. StudentID; Autonumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. Mark; Numeric
  7. LastAttendance; Date/Time
It is not at all clear what you are trying to do. How do you decide if an emploee is still in department? I really can't tell exactly what you are trying to do here so please provide more information.

Mary
Jun 16 '10 #2
mseo
181 100+
hi,
thank you for your dedication

here is the structure for each table
1- tbl_employees

Expand|Select|Wrap|Line Numbers
  1.  employee_id ; autonumber ; pk
  2. departmentid ; number ; fk
  3. jobtitle ; string ; fk
  4. hiredate; date/time
  5. birthdate ; date/time
  6. firstname ; string
  7. middlename ; string
  8. lastname ; string
  9. Address ; Memo
  10. City ; string
  11. Phonenumber ; string
  12. resignation ; yes/no
  13. resignationdate ; date/time
  14.  
2-tbl_job_history
Expand|Select|Wrap|Line Numbers
  1. employee_id ; number ; fk
  2. departmentid ; number ;fk
  3. job_title ; string ; fk
  4. startdate ; date/time
  5. enddate ; date/time
  6.  
I have a form for edit employees
I need when I edit an employee if the job_title and departmentid change to insert new record into tbl_job_history
with the data changed
If you need more detail please let me know
It's now 16 days trying to solve this
thank you again and over again
MSEO
Jun 17 '10 #3
mseo
181 100+
hi,
I really need any suggestion to do this,
Jun 19 '10 #4
mseo
181 100+
ok,
I just need to know how to check if the department ID changed or not (compare the old department and new inserted on in the form)
in other words
how to save the old department ID in aviarable to compare the old department id and new department id
thank you very much
any help would be appreciated
Jun 21 '10 #5
jimatqsi
1,271 Expert 1GB
May I suggest you add a button to the employee edit form. If you click this button, a new form could be opened to add a record to the job history table. Your user can simply fill in the necessary data and click "Save" on that form (which could be a subform on a different tab of the main form)

When the Save button is clicked, the job history record could be saved and then the data entered on that form could be use to update the main form before the sub-form is automatically closed.

I realize this is a high level description of the suggested process, and you might need a lower level description, including some lines of code. Just let us know what additional help you need.

Jim
Jun 21 '10 #6
FishVal
2,653 Expert 2GB
Your problem actually arises from that fact that you don't store employee data in a proper way. The most recent record in tbl_job_history should be recognized as employee 's current assignment. I guess it is the same that Jim has tried to suggest you but expressed in another way.

This by the way means that you have have an extra field [enddate] in tbl_job_history as well.

Kind regards,
Fish
Jun 21 '10 #7

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

Similar topics

3
by: Ron Nolan | last post by:
I have a large application that contains lots and lots of financial history data. The history data is currently set up in a table called 'TblHist' that exists inside each of these three .mdb...
1
by: Gomez | last post by:
I have set up two tables ****current and ****history. The history table contains all the fields which I want to track changes on. The current table contains just the most recent information from...
1
by: KC | last post by:
I am using Access 2002, with a database template from MS Office. The Orders Management Database. I have tweaked this for use with our company. It is a small database with close to a 1000 records...
5
by: Raphael Bauduin | last post by:
Hi, I'm looking at the logging of a database we'll put in production soon. I've seen some posts on this list about history tables, like mentioned in...
3
by: Rafael Tejera | last post by:
I would like to create an history module to my application.. I need some advice to use a duplicate database with who, when and where fields added to that new duplicate table, or create a table...
6
by: Kurosagi85 | last post by:
i need help and its urgent... i have created a table with fields: ItemNo, ItemName, IncomingStocks and also DateReceived. The IncomingStocks and DateReceived are volatile. it is expected to...
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
0
by: ummaria | last post by:
Hello, I have posted a question related to this problem before but I never got the full understanding of the concept. I would really appreciate if someone could help me, my deadline for the design...
23
by: swali | last post by:
I have a History table which is connected to the Admission table and the Admission table is connected to the Patient Information table. You can have multiple Admissions for one patient. I want to be...
3
by: hydriad | last post by:
I have what I think is a simple problem but I am stumped about how to go about it. I attempted searching for a solution but have not been able to find anything. Feel free to just point me at a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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.