On May 15, 1:19 am, dari...@gmail.com wrote:
> i have a problem connected with syntax error- in query i have that:
>
[quoted text clipped - 10 lines]
> fact that i'm looking for Data in this function and these 2 mistaken
> criterias have text values not data.
if Zmiana and Lokalizacja are text fields, you need single quotes,ie
SELECT DMax("Data","Pracownicy na stacjach","Lokalizacja stacji = '"
&
[Lokalizacja stacji] & "' And Zmiana = '" &[Zmiana] & "' And
Data<=#"&Data&"# ")
FROM Bledy
so for example
"Lokalizacja stacji = "
becomes
"Lokalizacja stacji = '"
^- this is a single quote, followed by
a double quote
"' And Zmiana = '" &[Zmiana] & "'
^- double quote, single quote
"' And Zmiana = '" &[Zmiana] & "'
^- single quote, double quote
"' And Zmiana = '" &[Zmiana] & "'
^- single quote, double
quote