Tasklist max tasks and max hours (1 Viewer)

Poire

New member
Local time
Today, 04:20
Joined
Jun 14, 2014
Messages
2
Hi,

I'm new in access. I have a question. I would like to make an action list based on tasks. I try to make a query that does the following things:
-Taken.Priority=1
-show maxium 5 tasks sorted on make date(taken.ingevoerd)
-OR with a total duration of maxium 480 minutes (Taken.[Geschatte duur (min))

The last one is to hard for me to make. For example if the duration of 4 tasks is 420 minutes, the fifth task (100 min) should not be shown, because the criteria of maximum amout of minutes is reached.

This is what I have made so far:
SELECT DISTINCT TOP 5 Taken.ID, Taken.Omschrijving, Taken.Ingevoerd, Taken.Deadline, Taken.Priority, Taken.[Geschatte duur (min)]
FROM Taken
GROUP BY Taken.ID, Taken.Omschrijving, Taken.Ingevoerd, Taken.Deadline, Taken.Priority, Taken.[Geschatte duur (min)]
HAVING (((Taken.Priority)=1))
ORDER BY Taken.Ingevoerd DESC;

Can anyone help me? Thanks in advance
 

sumox

Registered User.
Local time
Today, 16:50
Joined
Oct 1, 2013
Messages
89
what you want to do?

I simply can't Understand.

First tell which field should do what?
 

Poire

New member
Local time
Today, 04:20
Joined
Jun 14, 2014
Messages
2
I would like to make a selection of all the task in the tabel "taken". This selection should exist of maximum 5 tasks that have a maximum duration of 480 minutes in total. So the criteria should be set on the field Taken.[Geschatte duur (min)). The tasks should be sorted on the made date

An example:
task Duration (min) Made
1 300 1-1-14
2 200 2-1-13
3 150 3-1-14
4 80 4-1-14
5 80 4-1-14
6 80 4-1-14
7 80 4-1-14
8 80 4-1-14

I would like to show tasks 1 and 3 (task 2 will reach the maximum)

I hope it will be more clear
 

Users who are viewing this thread

Top Bottom