473,624 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1760
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.goo glegroups.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
2955
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 it. Simple database: I want to have a user enter Supply Orders (just for tracking purposes) by Item. The user may also enter a new item - "new" is a combination of Item, PartNumber and Vendor - they could have the
6
2460
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 the amount of records for a particular date is positive, i want the form to stop running, if there are no records that contain the date in question, then it should continue to run the form. The problem i'm having is referencing the date that is...
1
1920
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 DCount(,"qryIndividualFeedbackDetail",<>0) AS , qryIndividualFeedbackDetail.Representative FROM qryIndividualFeedbackDetail GROUP BY qryIndividualFeedbackDetail.RepresentativeTeam,
7
6343
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 formquerybuilder and the parameters are department, upsource, and date. i can't get the syntax down for this dcount: =DCount("*","tblcontactdata"," Between #" & & "# And #" & & "#" & "' AND '" & "'='" & "'forms! formquerybuilder!cboxupsource'" & "' AND '"...
1
5419
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 SQL, any suggestions would be hugely appreciated. Thanks.
5
5212
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 multi-user app over a network will run faster if DSum & DCount functions are replaced with SQL statements replicating the functions.What would be a SQL statement that would be functionally equal to DCount ? As I am a novice to SQL, anysuggestions...
7
32012
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 and the expression field should be: DCount("LoanDate","tblLoans","Id=CustomerID"), but the query says it can't find the expression parameter. note: the query does work if the experssion uses an ID number for the criteria, for example:...
2
1718
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 allow show "NO values were found " text instead of "#Error"message? I tried the following expression but it won't work =IIf(IsNull(DCount("ValueID";;"(" & & ") AND (ReportNotAvailable=true)")) ,"No Values were found"', ""). I keeping the that the...
3
2060
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 show how many instances of something happens. Within the query I am using a calculated filed called "registered".The syntax is Registered: DateDiff("w",,)
0
8675
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8474
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7158
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2604
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.