I have a query that has the following code in SQL view:
The #10/12/2003# was originally a textfield on my form but as it didn't work, I changed it to a constant date. 10 december 2003.
bestelbonnen.datum is a date/time field in the bestelbonnen table.
Now the problem is. Access just ignores what the the restrinction and shows all dates, lower and higher than #10/12/2003#. WHY???
Code:
SELECT Bestelbonnen.bestelbonnr, Bestelbonnen.klantnr, Bestelbonnen.datum, Bestelbonnen.gefactureerd, Bestelbonnen.geselecteerd, Bestelbonnen.TotaalBedrag, Bestelbonnen.Verzendingskosten, Bestelbonnen.Anderekosten, Bestelbonnen.Anderekostenprijs, Bestelbonnen.Anderekostenteken, Bestelbonnen.Leeggoedteken, Bestelbonnen.Leeggoed, Bestelbonnen.korting
FROM Bestelbonnen
WHERE (((Bestelbonnen.datum)<=#10/12/2003#) AND ((Bestelbonnen.gefactureerd) Is Null)) OR (((Bestelbonnen.gefactureerd)=0));
The #10/12/2003# was originally a textfield on my form but as it didn't work, I changed it to a constant date. 10 december 2003.
bestelbonnen.datum is a date/time field in the bestelbonnen table.
Now the problem is. Access just ignores what the the restrinction and shows all dates, lower and higher than #10/12/2003#. WHY???