473,396 Members | 2,011 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,396 software developers and data experts.

Dcount - novice user trying to write a novice expression

I admit - I'm a simple user but looking to improve skills.
Instructions aren't helping and have searched this group but am getting
bogged down by some of the programming-speak.

I have a query called PAL_PA Summary and in that query I calculate
several fields, all %s: Fed, ITS, SALT which are 3 of the 6 columns for
example. Basically its a query by person that shows the % of their time
spent in these diff fields (they add up to 100%).

I want to set up a field that counts for each person the # of fields
where the resulting % is equal or greater to 15%. So if person A spent
85% in Fed and 7% in ITS and 8% in SALT, their count would be 1. If
person B spent 85% in Fed and 15% in ITS and 0% in SALT, their count
would be 2.

I already admitted I'm a novice right? I've been trying to do this
from the design view and building an expression but am not sure I'm
understanding "expr" vs "domain" concepts and have seen quotation marks
in some of the google dialogue on other topics and so don't know if I'm
somehow supposed to include those in my expression - I apologize in
advance for this request for hand holding... hopefully someone will
take pity :)

Nov 13 '05 #1
1 1748
Gretchen:

One approach would be to use the IIF expression for your count field like
the following:

SELECT TEST2.Field1, TEST2.Field2, TEST2.Field3,
IIf([field1]>=15,1,0)+IIf([field2]>=15,1,0)+IIf([field3]>=15,1,0) AS MyCount
FROM TEST2;

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
<gr*************@ey.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I admit - I'm a simple user but looking to improve skills.
Instructions aren't helping and have searched this group but am getting
bogged down by some of the programming-speak.

I have a query called PAL_PA Summary and in that query I calculate
several fields, all %s: Fed, ITS, SALT which are 3 of the 6 columns for
example. Basically its a query by person that shows the % of their time
spent in these diff fields (they add up to 100%).

I want to set up a field that counts for each person the # of fields
where the resulting % is equal or greater to 15%. So if person A spent
85% in Fed and 7% in ITS and 8% in SALT, their count would be 1. If
person B spent 85% in Fed and 15% in ITS and 0% in SALT, their count
would be 2.

I already admitted I'm a novice right? I've been trying to do this
from the design view and building an expression but am not sure I'm
understanding "expr" vs "domain" concepts and have seen quotation marks
in some of the google dialogue on other topics and so don't know if I'm
somehow supposed to include those in my expression - I apologize in
advance for this request for hand holding... hopefully someone will
take pity :)
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
6
by: jstaggs39 | last post by:
I want to create a Dcount and an If...Then...Else statement to count the number of records in a table based on the date that is entered to run the form. The If....Else statment comes in because if...
1
by: BerkshireGuy | last post by:
I am running the following query and getting the "you tried to execute an query that does not include the specified expression as part of the aggregate function: SELECT...
7
by: kaosyeti | last post by:
hey.. i have a control in a report that needs to count the records from a table that match the parameters that the user selects when creating the report. the report is created with...
1
by: Sheldon Mopes | last post by:
I have read a few articles that state that a multi-user app over a network will run faster if DSum & DCount functions are replaced with SQL statements replicating the functions. As I am a novice to...
5
by: Sheldon Mopes | last post by:
I posted this about a week ago, and I got some interesting responses, but none of them acually answered what I was asking, so I'll try again.. I have read a few articles that state that a...
7
by: Michael R | last post by:
Good afternoon. I'm stucked in composing the syntax for DCount expression in a select query. The query qryCustomers has CustomerID field, the DCount function uses tblLoans with LoanDate and Id fields...
2
by: MusicMogul | last post by:
Hey Everyone, I'm trying to evaluate the DCOUNT expression. If there were no values found, it gives a "#Error" in my report. That "#Error" message doesn't look good on a report. How can I...
3
by: davidwelli | last post by:
Hello, All help is appreciated, I'm struggling with the following. Using Access 2003 (front end) connecting to Oracle 7 database (back end). I'm trying to create a query in access that will...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
jinu1996
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.