Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access query

Posted on 2011-09-16
3
Medium Priority
?
328 Views
Last Modified: 2012-05-12
I need a query to show the records were field A is > then 10 compare to field B

I would show this record
A        B
500    512
But not this one
500    509

?
0
Comment
Question by:Gerhardpet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 36551048
Assuming that you want to return records where the difference between A and B is greater than 10, this will do it:

SELECT Nz([FieldB])-Nz([FieldA]) AS FieldDiff, tblTestNos.FieldA, tblTestNos.FieldB
FROM tblTestNos
WHERE (((Nz([FieldB])-Nz([FieldA]))>10));
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 36551060
What's the difference between those two records? Do you mean you want to show records where the DIFFERENCE between A and B is greater than 10? If so:

SELECT * FROM YourTable WHERE (FieldB - FieldA) > 10
0
 
LVL 1

Author Closing Comment

by:Gerhardpet
ID: 36551135
Yes that is what I want. Thank you for your help
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question