473,473 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to use the criteria on a calculated field?

If I have a calculated field, [amount due], calculated from [Total] -
[TotalPayment], then on the same query, I used [amount due] > 0. It
prompts me for value for [amount due]. I have to use another query,
copy everything into the new query then use [amount due] > 0. Is there
a better way to do this?
Thank you very much, ming.

Nov 13 '05 #1
4 6469
swingingming wrote:
If I have a calculated field, [amount due], calculated from [Total] -
[TotalPayment], then on the same query, I used [amount due] > 0. It
prompts me for value for [amount due]. I have to use another query,
copy everything into the new query then use [amount due] > 0. Is there
a better way to do this?
Thank you very much, ming.


([Total] - [TotalPayment]) > 0

--
[OO=00=OO]
Nov 13 '05 #2
swingingming wrote:
If I have a calculated field, [amount due], calculated from [Total] -
[TotalPayment], then on the same query, I used [amount due] > 0. It
prompts me for value for [amount due]. I have to use another query,
copy everything into the new query then use [amount due] > 0. Is there
a better way to do this?
Thank you very much, ming.


([Total] - [TotalPayment]) > 0

--
[OO=00=OO]
Nov 13 '05 #3
Hi Travor,
It doesn't work. Because I have Sum in the query. Here's the SQL from
the Query:

SELECT tblCustomers.CustomerID, tblCustomers.CompanyName,
Sum(tblOrders.Total) AS TotalOfSum, Sum(qrySumOfPayments.TotalPayments)
AS TotalPaymentsOfSum, nz([TotalOfSum])-nz([TotalPaymentsOfSum]) AS
AmountDue
FROM tblCustomers INNER JOIN (tblOrders LEFT JOIN qrySumOfPayments ON
tblOrders.OrderID = qrySumOfPayments.OrderID) ON
tblCustomers.CustomerID = tblOrders.CustomerID
GROUP BY tblCustomers.CustomerID, tblCustomers.CompanyName;

But if there's no better way, I'll stay with my solution for now and
throw away elegency.
ming

Nov 13 '05 #4
Hi Travor,
It doesn't work. Because I have Sum in the query. Here's the SQL from
the Query:

SELECT tblCustomers.CustomerID, tblCustomers.CompanyName,
Sum(tblOrders.Total) AS TotalOfSum, Sum(qrySumOfPayments.TotalPayments)
AS TotalPaymentsOfSum, nz([TotalOfSum])-nz([TotalPaymentsOfSum]) AS
AmountDue
FROM tblCustomers INNER JOIN (tblOrders LEFT JOIN qrySumOfPayments ON
tblOrders.OrderID = qrySumOfPayments.OrderID) ON
tblCustomers.CustomerID = tblOrders.CustomerID
GROUP BY tblCustomers.CustomerID, tblCustomers.CompanyName;

But if there's no better way, I'll stay with my solution for now and
throw away elegency.
ming

Nov 13 '05 #5

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

Similar topics

7
by: Jack | last post by:
Hi, I have posted this problem before. Apprently, the suggestion took care of the problem. However, still I am getting the above error message. I am using a session variable to transfer a value...
2
by: Enterprise | last post by:
I'm stuck. I use Access 2000. I have a date field in a query. What I need done is if a Limit_Date function returns a true, I want the date field to be Between 1/1/02 and 1/1/03, otherwise I want it...
0
by: swingingming | last post by:
If I have a calculated field, , calculated from - , then on the same query, I used > 0. It prompts me for value for . I have to use another query, copy everything into the new query then use >...
5
by: jillandgordon | last post by:
I hope this group does not mind the most basic questions. I am trying to teach myself Access in two different versions. My company now uses Access 97 but, in the next few months, will be...
10
by: aaronrm | last post by:
I have a real simple cross-tab query that I am trying to sum on as the action but I am getting the "data type mismatch criteria expression" error. About three queries up the food chain from this...
1
by: meekie | last post by:
Hi I have had difficulty with this for some time. I have a database which has the fields COST, GST and RRP. The issue is that RRP is calculated using the other two fields (COST and GST) I...
2
by: dympna | last post by:
Hi can anyone suggest a fix for this... as I am a novice in access. I have created a training table with the following fields Employee Name - joe Training Received - Fork lift Date Received...
23
klarae99
by: klarae99 | last post by:
In Access 2003 I am creating an Inventory Database from scratch. There are two tables (tblProductInformation and tblSubProducts) that I am trying to use in a queary to determine the number of Items...
17
by: sharsy | last post by:
Hello guys, I would like some help in generating query criteria that will identify credit cards that have expired on an access database. The specific Field is formatted with a Data Type of...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.