Help please. Apologies but I am poor in access and programming :o) and am having trouble getting my head around this one!!...again!!!
I need to have a query or report to flag up someone who has been absent for over 8 days + in a 12 month period.
the relationship between tables is staffID. My sub table stores the absent occurences against my main Staff Names table. Obviously staff can have one or more occurences of being absent.
In my query I have a "dateStart" field which I have an expression which says > date -365 which filters my query to pull records within the last 12 months, so that's fine. I also have an expression field which tells me the number of days they've been absent =[enddate]-[startdate], so that's fine.
How on earth do I get to filter the query to show >8 days within last 12 months for one or more members of staff? If I do an expression of >8 it will ignore anyhting under 8 days although a staff member may have several occurences totalling 8 days...which is what I need to calculate and query.
I don't care how it's done, i just need help before i go maaaaaaaad!
Does this make sense? I would be extremely grateful of any comments on this (polite ones of course :o)
Regards, Graeme
6 1745
Add a Count to your query grouping by Staff.
Thanks, but can you elaborate a bit more? I have looked at all those options but count seems to add a 1 to everything?
REgards
Graeme
Sorry, forgot each occurence can be more than 1 day of absense, you'll want to sum the amount of days absent and group by their name.
THanks a lot. I said I was thick...
Do this in a report or query?
If it's in a report, how do I create a filter to filter data for over 8 days only for all staff?
MAny thanks in advance
Graeme
You do it in a query, the same query that your report is based on. Click on View > Totals and it'll bring up the new options you need.
NeoPa 32,556
Expert Mod 16PB
THanks a lot. I said I was thick...
Do this in a report or query?
If it's in a report, how do I create a filter to filter data for over 8 days only for all staff?
MAny thanks in advance
Graeme
You can do this in one of three ways : - Pass a WhereCondition parameter to the report on open when using DoCmd.OpenReport().
- Change the WHERE clause in your query.
- Edit the report itself to add a Filter condition (Property of the report object).
Sign in to post your reply or Sign up for a free account.
Similar topics
by: deko |
last post by:
I have a number of queries that pull totals from different tables. How do I
sum the different total values from each query to get a grand total? I
tried using a Union query like this:
SELECT...
|
by: New Guy |
last post by:
I'm trying to work with a system that somebody else built and I am
confounded by the following problem:
There is a table of payments and a table of charges. Each client has
charges and payments...
|
by: Joost |
last post by:
I have a form based on a totals query, with one of the fields as the
sum of the quantity of an article of the grouped records. I get an
#error# in a control on the form where I want to display the...
|
by: BerkshireGuy |
last post by:
I have the following code:
Dim strSQL As String
Dim DB As DAO.Database
Dim RS As DAO.Recordset
Dim intNumOfPaid, intNumOfHypoed, intNumOfNotTaken, intNumOfDeclined,
intNumOfWasted,...
|
by: brm6546545 |
last post by:
I have a tblTax. It has fields InvoiceNum, TaxAuthority, TaxableTotal,
NonTaxableTotal, TaxCollected.
Sample data
1,county,10.00,0.00,0.40
1,city,10.00,0.00,0.10
2,state,0.00,15.00,0.15
...
|
by: MikeSA |
last post by:
Hi
I a trying to create a chart that reflects monthly cumulative totals from a query.
The query fields show sales opportunities forecasted invoice date (OppForInvDate), Opportunity Description and...
|
by: JJM0926 |
last post by:
I'm trying to create a running totals query in access 97. I have
followed the directions on how to do it from Microsofts website
article id 138911. I took their code they had and replaced it with...
|
by: Micheal |
last post by:
Greetings Access Group,
Being relatively new to Access, I try to work through problems on my own and have been very successful, although I have a conundrum that I have been working on for two days...
|
by: elias.farah |
last post by:
Hello Everyone,
I'm having some very weird behavior on a couple of Access forms. (Not
all forms, just some of them).
The forms have been working for years, under Access XP/2003 etc, and
last...
|
by: colin spalding |
last post by:
How do I design a totals query that instead of the following result
YearOfAcc PremiumGBP
2004 9,142,306.95
2004 1,481,153.21
2005 11,981,987.85
2006 20,653,195.20
2006 ...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |