Date Comparison and Calculation combined

G

Guest

I'm trying to make a Time and Billing database.

I have a table (kmcost) with "cost of Km" and the date i've put the cost in
(because of the rising taxes and oil).
In my second table (expenses), i have the opportunity to select an expense
type. One of them is Transport.

But this is my problem:
now I made a Query with only the transport Km's by project (Like "Transport").
Ok but now i want to compare the transport date with the date i've put the
Km cost in.

when the Travel date is smaller or similar to the km cost's date nr 1, I
want him to make the calculation with this value. If the travel date is
smaller or similar to the km cost's date nr 2. I want him to make the
calculation with the second value.
and so on.

But I don't know how to configure this.

Can someone give me some advise.

Thanks in Advance
 
G

Guest

David said:
I'm trying to make a Time and Billing database.

I have a table (kmcost) with "cost of Km" and the date i've put the cost in
(because of the rising taxes and oil).
In my second table (expenses), i have the opportunity to select an expense
type. One of them is Transport.

But this is my problem:
now I made a Query with only the transport Km's by project (Like "Transport").
Ok but now i want to compare the transport date with the date i've put the
Km cost in.

when the Travel date is smaller or similar to the km cost's date nr 1, I
want him to make the calculation with this value. If the travel date is
smaller or similar to the km cost's date nr 2. I want him to make the
calculation with the second value.

***** your two conditions are the same! you have:
travel date < then km cost date use nr 1 and then
travel date < then km cost date use nr2

why do you mean by "similar" -> "equal to"?

You wil need to include the date fields in the query and use a calculated
field with an IF based on your travel date conditions.
 

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


Top