I have a form that has to show the result of a search in a specific order.
To maintain the necessary result I have a cross tab query, a result of joining 3 tables, and use it as the record source of my form.
Opening the query by itself, shows a little less than half a million records.
The form's record source reads as :
Opening the form is very fast, without any delay. Because the form opens empty,
then I change the source code to something like :
Everything was just fine until 2 weeks ago.
Since then, opening the form with the exact same record source takes 2 to 3 minutes. (approximately. Have not timed the delay)
Once the form is opened after a long wait, applying filter is very fast, just like before.
I noticed that if I change the record source of the form to the following, everything is back to normal.
While I solved the delay problem, I'd like to know :
1- Why WHERE False and PK=0 have different results.
2- What might have happened to cause WHERE FALSE take a long time for the form to open.
Thanks.
To maintain the necessary result I have a cross tab query, a result of joining 3 tables, and use it as the record source of my form.
Opening the query by itself, shows a little less than half a million records.
The form's record source reads as :
Code:
SELECT * FROM MyCrossTabQuery WHERE False;
then I change the source code to something like :
Code:
SELECT * FROM MyCrossTabQuery WHERE ShippedOn IS NULL AND Delivery BETWEEN X AND Y
Since then, opening the form with the exact same record source takes 2 to 3 minutes. (approximately. Have not timed the delay)
Once the form is opened after a long wait, applying filter is very fast, just like before.
I noticed that if I change the record source of the form to the following, everything is back to normal.
Code:
SELECT * FROM MyCrossTabQuery WHERE OrderPK=0;
While I solved the delay problem, I'd like to know :
1- Why WHERE False and PK=0 have different results.
2- What might have happened to cause WHERE FALSE take a long time for the form to open.
Thanks.
Last edited: