Field Dividing

C

Chris Jackson

Dear All,

I'm have been asked by my HR and Accounts dept to create a DB for them.

I am doing okay so far, but I have an issue with one of the requests the
Accounts Dept have asked me to put in the DB.

They currently want 2 fields, one that shows their annual wage and the
second automatically populates their monthly wage going by the value their
annual wage.

I guarantee there will be a lot more "special" features they want it to do,
but that’s the key one for the moment.

Any help would be greatly appreciated at this stage, as I've been popping
around the net looking for help for over an hour now.

Regards,
Chris
 
K

Ken Snell \(MVP\)

Assuming that the monthly wage is just the annual wage divided by 12, there
is no good reason to store the monthly wage in a table. You can always get
the monthly wage from a query:

SELECT EmployeeID, AnnualWage,
(AnnualWage / 12.0) AS MonthlyWage
FROM TableName;

Storing data that can be calculated from other data is redundant, violates
normalization rules, and makes it more difficult to maintain the integrity
of the data (if you store both numbers, your forms will have to update both
fields whenever you change the annual amount for an employee).
 
A

Andy Hull

Hi Chris

First you need to design your tables - to store your data.
Then, you enable users to view and manipulate that data using forms.

You probably already have a table with a field to store the annual wage.
A general rule is that you shouldn't store data that can be derived from
data already there. So you don't need to store the monthly wage as well.

Then, on the form that displays the annual wage, place a text box with the
formula you want it to use.

E.g.

=AnnualWage/12


hth

Andy Hull
 
F

fredg

Dear All,

I'm have been asked by my HR and Accounts dept to create a DB for them.

I am doing okay so far, but I have an issue with one of the requests the
Accounts Dept have asked me to put in the DB.

They currently want 2 fields, one that shows their annual wage and the
second automatically populates their monthly wage going by the value their
annual wage.

I guarantee there will be a lot more "special" features they want it to do,
but that¢s the key one for the moment.

Any help would be greatly appreciated at this stage, as I've been popping
around the net looking for help for over an hour now.

Regards,
Chris

How does YOUR company compute the monthly wage?
For example, is it [Annual Wage] / 12
where the wages for February and December are the same?
Or some other calculated method?

In any case, only store the Annual Wage.
You can use an unbound control, or a query, to compute and display the
monthly wage when ever that information is needed.

=[AnnualWage]/12

or use whatever other calculation your company uses.
 
C

Chris Jackson

Where do i put the ""=[Annual Salery]/12" code?
Sorry about this, never done anything like this before in Access, normally
just use it as an Audit DB, don’t need reporting or anything.

The Accounts dept have a whole model on how this DB is going to work,
everything from it working out Bonuses for that year and forecasting wage
cost for the year. Example, a list of each month, when you tick the month it
tells you how much they have earned, but with the option on increasing there
monthly wage for the months left over


fredg said:
Dear All,

I'm have been asked by my HR and Accounts dept to create a DB for them.

I am doing okay so far, but I have an issue with one of the requests the
Accounts Dept have asked me to put in the DB.

They currently want 2 fields, one that shows their annual wage and the
second automatically populates their monthly wage going by the value their
annual wage.

I guarantee there will be a lot more "special" features they want it to do,
but thatʼs the key one for the moment.

Any help would be greatly appreciated at this stage, as I've been popping
around the net looking for help for over an hour now.

Regards,
Chris

How does YOUR company compute the monthly wage?
For example, is it [Annual Wage] / 12
where the wages for February and December are the same?
Or some other calculated method?

In any case, only store the Annual Wage.
You can use an unbound control, or a query, to compute and display the
monthly wage when ever that information is needed.

=[AnnualWage]/12

or use whatever other calculation your company uses.
 
F

fredg

Where do i put the ""=[Annual Salery]/12" code?
Sorry about this, never done anything like this before in Access, normally
just use it as an Audit DB, don’t need reporting or anything.

The Accounts dept have a whole model on how this DB is going to work,
everything from it working out Bonuses for that year and forecasting wage
cost for the year. Example, a list of each month, when you tick the month it
tells you how much they have earned, but with the option on increasing there
monthly wage for the months left over

fredg said:
Dear All,

I'm have been asked by my HR and Accounts dept to create a DB for them.

I am doing okay so far, but I have an issue with one of the requests the
Accounts Dept have asked me to put in the DB.

They currently want 2 fields, one that shows their annual wage and the
second automatically populates their monthly wage going by the value their
annual wage.

I guarantee there will be a lot more "special" features they want it to do,
but thatʼs the key one for the moment.

Any help would be greatly appreciated at this stage, as I've been popping
around the net looking for help for over an hour now.

Regards,
Chris

How does YOUR company compute the monthly wage?
For example, is it [Annual Wage] / 12
where the wages for February and December are the same?
Or some other calculated method?

In any case, only store the Annual Wage.
You can use an unbound control, or a query, to compute and display the
monthly wage when ever that information is needed.

=[AnnualWage]/12

or use whatever other calculation your company uses.

If that is the correct method of calculation, then add an unbound text
control to your form or report.

As it's control source, write:
=[AnnualWage] / 12

The above may result in a large decimal value, i.e. 2505.6666667.

To display the result as a user friendly 2 digit value, ($ 2,505.67)
set the control's Format property to:
$ #,###.00

All values will be rounded to 2 digits.

Change [AnnualWage] to whatever the actual field name is.
 

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

Similar Threads

Excel Noob 2
UNION query 11
On the fly run-time 2
assistance with budget design 1
My last post in this forum 7
Count Occurance 2
2003 vs. 2007 issues 3
Renewing member database design question. 7

Top