Why does this query ask for the start date and end date twice?

  • Thread starter Thread starter GWB
  • Start date Start date
G

GWB

SELECT Data1.Date, Data1.Shift, Data1.Thickness, Data1.Species, Data1.Plies,
Data1.ValueLeft, Data1.ValueRight
FROM Data1
WHERE (((Data1.Date)>=[Start Date] And (Data1.Date)<=[Stop Date]));


Thanks for any help
 
Because it has this --
WHERE (((Data1.Date)>=[Start Date] And (Data1.Date)<=[Stop Date]));
and the objects [Start Date] and [Stop Date] are not fields in your
table Data1.
 
What would be a better way to do it Karl?

Thanks in advance

KARL DEWEY said:
Because it has this --
WHERE (((Data1.Date)>=[Start Date] And (Data1.Date)<=[Stop Date]));
and the objects [Start Date] and [Stop Date] are not fields in your
table Data1.

--
Build a little, test a little.


GWB said:
SELECT Data1.Date, Data1.Shift, Data1.Thickness, Data1.Species, Data1.Plies,
Data1.ValueLeft, Data1.ValueRight
FROM Data1
WHERE (((Data1.Date)>=[Start Date] And (Data1.Date)<=[Stop Date]));


Thanks for any help
 
Probably because you have applied a sort while in datasheet view and saved it.
This sometimes causes a query to run twice when you are showing the results
in datasheet view.

Quickest way to fix the problem is probably to copy the SQL. Open a new query
and paste the SQL into the new query's SQL view. Then Save the new query over
the old query.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
Thanks John

John Spencer said:
Probably because you have applied a sort while in datasheet view and saved it.
This sometimes causes a query to run twice when you are showing the results
in datasheet view.

Quickest way to fix the problem is probably to copy the SQL. Open a new query
and paste the SQL into the new query's SQL view. Then Save the new query over
the old query.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
SELECT Data1.Date, Data1.Shift, Data1.Thickness, Data1.Species, Data1.Plies,
Data1.ValueLeft, Data1.ValueRight
FROM Data1
WHERE (((Data1.Date)>=[Start Date] And (Data1.Date)<=[Stop Date]));


Thanks for any help
.
 
Back
Top