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  

0 criteria in query does not work



 
 
Thread Tools Display Modes
  #1  
Old October 25th, 2007, 03:50 AM posted to microsoft.public.access.queries
Pat A.
external usenet poster
 
Posts: 1
Default 0 criteria in query does not work

I created a query that has many calculations. It all works fine until I
enter the criteria "0" in one of the calculated columns. It then treats
the columns that are the addends in that equation as if they were parameter
queries. In other words, it asks me to input values for the two columns that
I am adding in that column. If I take it a step back and input the 0 on
the criteria lines for those two columns that are added together, it than
asks me to input values for the columns that are added together to calculate
those columns. What am I doing wrong!!!!!

HELP!!!!

Thanks!

  #2  
Old October 25th, 2007, 10:26 AM posted to microsoft.public.access.queries
Wolfgang Kais[_2_]
external usenet poster
 
Posts: 48
Default 0 criteria in query does not work

Hello "Pat A".

"Pat A." wrote:
I created a query that has many calculations. It all works fine
until I enter the criteria "0" in one of the calculated columns.
It then treats the columns that are the addends in that equation
as if they were parameter queries. In other words, it asks me to
input values for the two columns that I am adding in that column.
If I take it a step back and input the 0 on the criteria lines
for those two columns that are added together, it than asks me to
input values for the columns that are added together to calculate
those columns. What am I doing wrong!!!!!


The problem seems to be the following:
You calculate fields from calculated fields using something like:
Fidld1: some formula
Field2: some other formula
Field3: [Field1]+[Field2]
And you probably try to filter all records where Field3 0.
Access tries to apply criteria before retrieving other fields and
doing calculations (which is good for the performance and bad for
your query...).
If you really need criteria for a calculated field (which is also
bad for the perfomrance, because no index can be used), you will have
to rewrite the expression for this calculated field so that it does't
use other calculated fields but only fields from the source tables
or queries.

--
Regards,
Wolfgang


 




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 05:28 AM.


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