473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Access Count Problem

Hi,
i am creating a database for my dads business and i have one problem with one bit. its pretty basic
i have a query that is counting records in column A But it want It not to include records witch have Sold or Used in column B.

please can someone help. its the very last thing i need to complete in my database and its driving me mad
thanks
Jul 20 '07 #1
4 1374
NeoPa
32,556 Expert Mod 16PB
Please remember to provide a meaningful Title for any threads started (Please Use Appropriate Titles for New Threads!). This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions.

MODERATOR.

PS I've changed it to something more appropriate.
Jul 20 '07 #2
NeoPa
32,556 Expert Mod 16PB
Hi,
i am creating a database for my dads business and i have one problem with one bit. its pretty basic
i have a query that is counting records in column A But it want It not to include records witch have Sold or Used in column B.

please can someone help. its the very last thing i need to complete in my database and its driving me mad
thanks
As for your question, you can do that without too much trouble, but how it is best done depends on exactly what you need. Post in the SQL of your current query and I'll look into it for you.
Jul 20 '07 #3
nico5038
3,080 Expert 2GB
Open the graphical query editor and place column B
In the Criteria cell below enter:

NOT IN ('used';'sold')

This will exclude the values.

Nic;o)
Jul 20 '07 #4
NeoPa
32,556 Expert Mod 16PB
This is one of the solutions. This assumes that you only want to include those records from the query. If, however, you want to count those records but include the whole dataset for another field (for instance) then you need to use a construct (in the SQL) like :
Expand|Select|Wrap|Line Numbers
  1. SELECT ...
  2.        IIf([ColumnB] In('Used','Sold'),1,0) AS CountUsedSold,
  3.        ...
  4. FROM [Table]
  5. ...
Jul 22 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
9
by: Warren | last post by:
I am trying to create a report that does the following: Access Data in Query: NAME | DATE | SALE TYPE | ------------------------- John DOE | 1282003 | TYPE A Jane DOE | 1282003 | TYPE C...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
1
by: B Moor | last post by:
Hello, I am quite bogged down with this problem and would like some tips/help if any one has any. Thanks in advance. The Problem ----------- This system initially seemed quite stable for...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
1
by: nfrodsham | last post by:
In Microsoft's help literature, it states: "You can filter out non-unique rows by using the DISTINCT option of an aggregate function" I am trying to do this in Access 2003 with the COUNT...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
1
by: chungiemo | last post by:
Hi thought I would do another thread as this one is a bit different from the previous problem I am looking for a solution to the relating problem Comparing 2 access databases with 2 tables,...
1
by: KevinC | last post by:
Hi, I have a database that contains a table with an administration area and a number associated with the "count" of a certain characteristic of that area. For use in another piece of software...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.