fill in table

A

aminihojat

Hi all,
I appreciate you for taking time to response.
previous records already exists. the previous months doesn't have a date in
it . the structure of records is so:
fldmonth fldname fldworkdays fldsalary flddatediff fldsalarydiff

1 peter 30 30000
2 peter 30 30000
3 peter 30 30000
4 peter 30 45000 2006/02/21

5 peter 30 45000
1 amini 30 90000
2 amini 30 90000
3 amini 30 120000 2006/01/26

4 amini 30 120000
5 amini 30 120000

I want to update table as follow:
fldmonth fldname fldworkdays fldsalary flddatediff fldsalarydiff
1 peter 30 30000
2 peter 30 30000

3 peter 30 30000

4 peter 30
45000 2006/02/21 20000

5 peter 30 45000
1 amini 30 90000
2 amini 30 90000
3 amini 30 120000 2006/01/26
35000
4 amini 30 120000
5 amini 30 120000

for example in month 4 we understand that peter's monthly salary has raised
from 30000 to 45000 since 2006/02/11 and in this month we must calculate
difference of his salary.
our salary is monthly and for 30 days eventhough the month is 29,30 or 31
days.
We don’t have multiple years of data and for the new year we copy the
records of table for only month 12 for each person to a new table in new
database for month 1.
For february, January and other months we have only 30 days for salary.
Salary difference for
peter:((45000-30000)/30)*((2006/04/30-2006/02/21)-30)=20000
Salary difference for
amini:((120000-90000)/30)*((2006/03/30-2006/01/26)-30)=35000
Thank you for your help
amini
 
A

aminihojat

Hi BW
As you guided I designed three tables:
1-tbldate-fldyear,fldmonth,fldmonthnumber with data types number
2-tblemployees-fldname,fldsalary,flddatesalarychanged first field datatype
text and two others number
3-tblpayments-fldmonthnumber,fldname,fldsalary,flddatesalarychanged that two
last fields have data type number.
Meanwhile I set relatoinship fldmonthnumber between tbldates and tblpayments
and a relationship for fldname between tblemployees and payments.
Then I created autoform for tblemployees . but I don't know how to create
the other form for calculating and producing a report .would you please help
me to write calculation in VBA?
I have tried before but I couldn’t do it.
Thanks in advance
 
A

aminihojat

I expected other people write their opinions and help
by the way i appreciate any guidance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top