A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Difference between fields in query



 
 
Thread Tools Display Modes
  #1  
Old February 24th, 2010, 03:49 PM posted to microsoft.public.access.queries
NPell
external usenet poster
 
Posts: 91
Default Difference between fields in query

Hello,

i have a query in which i am trying to show a total number of items,
then a total number of items with a criteria from a different table.
Then calculate the difference:

The way the query is set up is:
Date (table1)
Date: Count (table1)
Date: Count (table2)
Difference between CountofDate(tbl1) and CountofDate(tbl2).

The first bit all works fine, its the difference i am struggling with.
There is prompt for a parameter value for CountofDate(tbl1) and then
CountofDate(tbl2).
I click ok without entering for both and the result is totally fine,
its just this unneccessary (and confusing) parameter prompt.

Any ideas?
Regards,
  #2  
Old February 24th, 2010, 04:46 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Difference between fields in query

NPell wrote:

Hello,

i have a query in which i am trying to show a total number of items,
then a total number of items with a criteria from a different table.
Then calculate the difference:

The way the query is set up is:
Date (table1)
Date: Count (table1)
Date: Count (table2)
Difference between CountofDate(tbl1) and CountofDate(tbl2).

The first bit all works fine, its the difference i am struggling with.
There is prompt for a parameter value for CountofDate(tbl1) and then
CountofDate(tbl2).
I click ok without entering for both and the result is totally fine,
its just this unneccessary (and confusing) parameter prompt.



Instead of using the alias names for the calculated fields,
use the expressions:

Difference: Count (table1) - Count (table2)

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.