We help IT Professionals succeed at work.

Removing duplicates in a Ms Access Query

61 Views
Last Modified: 2019-01-28
My query is duplicating one figure in a column called Taxation, how do I stop that, I had this problem a long time ago I cannot remember how I sorted it out any idea here?
Here is a query below:
SELECT QryEmplyoyees.EMPID, QryEmplyoyees.DSMonth, QryEmplyoyees.FirstName, QryEmplyoyees.LastName, QryEmplyoyees.Basic, QryEmplyoyees.Housing, QryEmplyoyees.Transport, QryEmplyoyees.Lunchallowance, QryEmplyoyees.FreeTax, QryEmplyoyees.BandOne, QryEmplyoyees.BandTwo, QryEmplyoyees.BandThree, Format([DSMonth],"mmm") AS [Month], Year([DSMonth]) AS YR, Month([DSMonth]) AS Mo, GetRunSum(Year([DSMonth]),Month([DSMonth])) AS RunningTotal, ZRATaxFree(Year([DSMonth]),Month([DSMonth])) AS FreeTaxTotal, ZRABandOne(Year([DSMonth]),Month([DSMonth])) AS BandOneTotal, ZRABandTwo(Year([DSMonth]),Month([DSMonth])) AS BandTwoTotal, DLookUp(" [BandTwoTotal] ","QryStaff"," [Mo] =10") AS Taxation
FROM QryEmplyoyees;

Qryduplicates.png
Regards

Chris
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT

Author

Commented:
Thank you so much Gustav Brock you have clearly sorted my problem!

Regards

Chris
CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
You are welcome!
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.