Total of salary package

T

Tia

Dear,

I have a query for Salay logg for employees and i am trying to
calculate how much they are getting as full package
The salary details are as follows

Basic : Currency Data type
Transportation: Text data Type "Some times its provided by the company
some times it would be given as money"
Accomodation : Text Data Type "Some times its provided by the company
some times it would be given as money"
Total = ??

Please help
 
P

PvdG42

Tia said:
Dear,

I have a query for Salay logg for employees and i am trying to
calculate how much they are getting as full package
The salary details are as follows

Basic : Currency Data type
Transportation: Text data Type "Some times its provided by the company
some times it would be given as money"
Accomodation : Text Data Type "Some times its provided by the company
some times it would be given as money"
Total = ??

Please help

Regardless of Access, you cannot program a computer to do arithmetic
operations on nonnumeric data types. So, you will have to assign a currency
value to company-provided transportation and accommodations in order to
calculate a total.
 
J

John W. Vinson

Dear,

I have a query for Salay logg for employees and i am trying to
calculate how much they are getting as full package
The salary details are as follows

Basic : Currency Data type
Transportation: Text data Type "Some times its provided by the company
some times it would be given as money"
Accomodation : Text Data Type "Some times its provided by the company
some times it would be given as money"
Total = ??

Please help

What is the sum of $1250 and "Provided by company"?

What is the sum of $1250 and "Given as money"?

or more to the point what do you want it to be?? You will somehow have to have
- or generate - a numeric value based on whatever is in the Text field; you
can't add Currency and Text. What is actually in the Transportation field?
Please post examples.
 
T

Tia

What is the sum of $1250 and "Provided by company"?

What is the sum of $1250 and "Given as money"?

or more to the point what do you want it to be?? You will somehow have tohave
- or generate - a numeric value based on whatever is in the Text field; you
can't add Currency and Text. What is actually in the Transportation field?
Please post examples.

Example: John
Position : Architect
Basic : 5000
Transportation: Provided by the company
Accomodation :2500
Total = ??

Example: Tia
Position : Junior Architect
Basic : 3000
Transportation: 500
Accomodation :provided by the company
Total = ??

If i cannot use a sum in a text is there is any way to show that this
employee is taking benefits instead of cash ?
 
J

John W. Vinson

Example: John
Position : Architect
Basic : 5000

Example: Tia
Position : Junior Architect
Basic : 3000

If i cannot use a sum in a text is there is any way to show that this
employee is taking benefits instead of cash ?

If the Text field consists of - or starts with - a number, you could use

[Basic] + Val(NZ([Transportation], "")) + Val(NZ([Accommodation],""))

You can show whatever you want based on what's in your table. I'm not sure
what you're asking "is there any way" - it's YOUR database, you can display
the contents of the Transportation field on the form or report, you can
display text if it is NULL or not null, etc.
 

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