craigprice
Registered User.
- Local time
- Today, 13:35
- Joined
- Apr 8, 2013
- Messages
- 44
Hi,
I am producing a form for a rota system, within the rota I want it to look at staff on the day/night shift and check their skills and count them, the counts then populate a footer item with numbers so we can work out where and what cover is needed, this is probably me being a novice and I assume it is because of the vast amount of actions I'm asking it to perform but it is extremely slow.
Here is an example of the code;
This is repeated for windowscountday1-31 and windowscountnight1-31 along with about 5/6 other skills e.g skill2countday1 skill3countday1 etc etc.
This means there are about 310 calculations, these calculate and then populate the relevant text box (e.g windowscountday1)
I am sure there will be a quicker and simpler way to do this, I've spent a good few hours just naming boxes to end up with this result...
I'm not sure if this is something I could potentially do with a query? Just not sure how I'd go about writing it and can I have the query run on each of these days/nights/skills?
Thanks in advance.
I am producing a form for a rota system, within the rota I want it to look at staff on the day/night shift and check their skills and count them, the counts then populate a footer item with numbers so we can work out where and what cover is needed, this is probably me being a novice and I assume it is because of the vast amount of actions I'm asking it to perform but it is extremely slow.
Here is an example of the code;
Code:
windowscountday1 = DCount("[ID]", "qrySHIFTAJAN", "[01day] = 'D' AND windows = 1") + DCount("[ID]", "qrySHIFTAJAN", "[01day] = 'D*' AND windows = 1")
This is repeated for windowscountday1-31 and windowscountnight1-31 along with about 5/6 other skills e.g skill2countday1 skill3countday1 etc etc.
This means there are about 310 calculations, these calculate and then populate the relevant text box (e.g windowscountday1)
I am sure there will be a quicker and simpler way to do this, I've spent a good few hours just naming boxes to end up with this result...
I'm not sure if this is something I could potentially do with a query? Just not sure how I'd go about writing it and can I have the query run on each of these days/nights/skills?
Thanks in advance.