473,513 Members | 4,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form selection subtracted from other table.

20 New Member
I have a form named "Employee Absence". This form is linked to a table that lists each absence. (This table is differnet from the one mentioned below) In the "Employee Absence" form there is a drop down box for selecting the type of absence an employee used. The options are Sick Leave, Unpaid, Vacation and a few others.

In another Table called "Employee Information", I have the Employee's name, hire date, and some other personal records, as well as fields to store the ammount of Sick Leave, Vacation....ect... The Idea here is to store the number of earned Vacation Hours, Sick Hours...ect... as they are accumulated.
(These numbers are entered manually into this table)

Example) Employee # 225 has earned 20 sick hours so far. This is stored in the "Employee Information table", under sick hours.

What I would like to do, is when you are in the "Employee Absence" form, and you enter a new record of Employee # 225 using up 8 hours of sick leave, then those 8 hours are subtracted from the "Employee Information" Table, Employee #225's sick hours. Thus the 20 stored hours, minus the 8 Hours.

So, idealy, the "hours gone" selected on my form, will be subtracted from the field in my "Employee Information" table. This is based on what type of absence is selected in the form. If sick leave is selected on the form, then I want the hours of sick leave subtracted from the saved "sick days" in my Employee info table.

Hope thats clear.....thank you for any input.
Apr 23 '07 #1
1 1256
MMcCarthy
14,534 Recognized Expert Moderator MVP
You shouldn't store calculated fields in a table as they are too difficult to keep up to date. Calculated fields should be stored dynamically on forms and reports as required.
Apr 24 '07 #2

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

Similar topics

2
2599
by: Terry | last post by:
I have cerated a Form, ExamsFrm, which is used to input details of exams taken at several Centres. It dosplays details from StudentTbl and has a SubForm which displays details from ExamsTble. I...
2
2041
by: S P Arif Sahari Wibowo | last post by:
Hi! Do you know how to put a form's Access-Visual-Basic-code that will force the form to be inserted, while the user has not type anything in the form, without changing focus, selection, etc.? ...
5
5887
by: Genojoe | last post by:
I am using code from Help with two exceptions. (1) I increased the number of sample rows from 3 to 20, and (2) I anchored the datagrid to bottom of form so that I can change the size of the grid by...
2
7035
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
13
3402
by: kev | last post by:
Hi all, I have created a database for equipments. I have a form to register the equipment meaning filling in all the particulars (ID, serial, type, location etc). I have two buttons at the end...
1
1743
by: KMEscherich | last post by:
Using Access '97 Hi there, am wondering if someone can please help me with the following: I have a master table (T_INVESTIGATION) that contains the following fields as well as other fields. ...
4
2173
by: deanndra | last post by:
First, I want to say thank you to Scott and the others who replied to my first post here. I had to put that database on hold for the moment when I was tasked with a new one. I am building another...
3
1623
scubak1w1
by: scubak1w1 | last post by:
Hello, I posted this in the HTML forum, but it was suggested I post it over here as well by a moderator. I have a form that will not 'fire' in non-IE browsers?? I have poked and poked at the code...
0
7153
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...
0
7373
Oralloy
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,...
0
7432
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
7519
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
5677
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,...
1
5079
isladogs
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...
0
4743
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...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1585
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 ...

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.